Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: how to call c# member function from JavaScript with named parameter. what should i do

0
0
how to call c# member function from JavaScript with named parameter. what should i do
// i want my JavaScript Code will be something like this
// By this script i want to call c# method with named arguments

var retResult = new myCSharpMethod( a:'aa', b:'bb');  
// my C# class is as below
public class myCSharpClass
    {
        public string myCSharpMethod(string a="", string b="")
        {
            string strRet= a + " " + b;
            return strRet;
        }
    }

Viewing all articles
Browse latest Browse all 2297




Latest Images