Call c# function of global class from javascript -


i have global function returns string. need access function javascript in 1 of pages , set returned value javascript variable.

example:-

var jsvariable = <%globalclass.methodreturningstring();%>; 

how that?

you cannot call c# function this. need create web service or webmethod in order call function. please see link you. http://www.aspsnippets.com/articles/calling-aspnet-webmethod-using-jquery-ajax.aspx


Comments