Problem with jQuery.get() function
I develop web site using Asp. net.
I'm using jQuery .get() function to load data from the server. I try to make some test project with only default.aspx page. In code behind I specified static method with WebMethod attribute like in the code below
[WebMethod]
public static string GetTime()
{
return DateTime.Now.ToString();
}
OnClick event of HTML button this code was called. I set breakpoint on method GetTime() through VS 2010. This method doesn't call. I dont' konw why.
$.get("Default.aspx/GetTime", function (data) {
alert("Data Loaded: " + data);
});
Where is the problem?