samedi 23 janvier 2016

Call C# from Javascript in ios UIWebview

I have a web app and my backend is implemented in C#.

I would like to call the CallMethod (backend) from HelloWorld (frontend) function.

Ive tried the following code but i'm missing something...

backend code:

Class CallClass
{
    public void CallMethod(string x)
    {
     //I write me logic here.
    }
}

frontend code:

<script type=”text/JavaScript”>
    var x='123';
    function HelloWorld(){
        CallClass.CallMethod(x);
    }
</script>




Aucun commentaire:

Enregistrer un commentaire