Raj Wrote:
how to call instance method in web method?
Since webservice is a static method, it can only call other static methods or new objects.
WebMethod:
[WebMethod]
public static void ResetDate(DateTime TheNewDate)
{
var thisPage = new Test();
thisPage.LoadCallHistory("args");
}
Class:
Class Test
{
public void LoadCallHistory(string args)
{
}
}
Or
WebMethod:
[WebMethod]
public static void Disp()
{
disp();
}
Class:
public static void disp()
{
if (txtbox.Text != "")
{
txtbox.Text = "Hello world";
}
}
Raj Wrote:
how to call a web method using Javascript?
Check
Calling Web Services from HTML Pages using JavaScript[
^]
Hope it helps!
--Amit