I have an custom extender control and I call the webmethod from it. The method is called but the execution ends on the first statement inside the webmethod. \[code\] [WebMethod]public string calculateTime(string dateTime){ DateTime questiondate = Convert.ToDateTime(dateTime); string result = ""; //LinkRow[16] = linkdate; int day = questiondate.Day; int sec = questiondate.Second; int minute = questiondate.Minute; int hour = questiondate.Hour; int month = questiondate.Month; int year = questiondate.Year; if (year < DateTime.Now.Year) { result = questiondate.ToString("D"); } else { if (month < DateTime.Now.Month) { result = questiondate.ToString("m"); } else { if (day < DateTime.Now.Day) { result = questiondate.ToString("m"); } else { if (hour < DateTime.Now.Hour) { int hours = DateTime.Now.Hour - questiondate.Hour; result = hours + " Hours ago"; } else { if (minute < DateTime.Now.Minute) { int minutes = DateTime.Now.Minute - questiondate.Minute; result = minutes + " Minutes ago"; } } } } } return result;}\[/code\]Only the \[code\] DateTime questiondate=Convert.ToDateTime(dateTime); \[/code\]is hit and the lines below are never executed and then the execution starts for the next call.
The code that calls the method from the Extender is \[code\] timer: function(){ Sys.Net.WebServiceProxy.invoke("http://localhost:18194/ProfileTenModified/Notifications.asmx", "calculateTime",false,{"dateTime":"2000-30-01 02:20:20 AM"}, function (result, e){ this.get_element().innerText=result;}, function(e){},"User Context", 10000);},\[/code\]Any help will be greatly appreciated. Thanks
The code that calls the method from the Extender is \[code\] timer: function(){ Sys.Net.WebServiceProxy.invoke("http://localhost:18194/ProfileTenModified/Notifications.asmx", "calculateTime",false,{"dateTime":"2000-30-01 02:20:20 AM"}, function (result, e){ this.get_element().innerText=result;}, function(e){},"User Context", 10000);},\[/code\]Any help will be greatly appreciated. Thanks