Hi,
I am calling a server method from a java script function but it is getting invoke. So what is the problem it is having. Please advise me.
This is the script:
<script type="text/javascript" language="javascript">
function servermethod() {
var name = $get("txtname").value;
PageMethods.CallingserverMethod(name);
alert(name);
}
Code Behind:
[WebMethod]
public static string CallingserverMethod(string name)
{
return "Hi" + name + Environment.NewLine + "This is an example";
}