Interview Question
Qus: I am not able to use the Page Methods option. What should I do to use webMethods?
Answers (1)
[System.Web.Services.WebMethod()]
[System.Web.Script.Services.ScriptMethod()]
public static string GetCountry()
{
// your code
}
2. ScriptManager EnablePageMethods to TRUE
3. In Javascript
function GetCountryName() {
PageMethods.GetCountry();
}