Call non-static method in server side(aspx.cs) from client side use javascript (aspx).....

Posted by Pramulia on Stack Overflow See other posts from Stack Overflow or by Pramulia
Published on 2009-09-01T02:24:07Z Indexed on 2010/05/01 5:17 UTC
Read the original article Hit count: 255

Filed under:
|
|

how Call non-static method in server side(aspx.cs) from client side using javascript (aspx)....?

As far as I know I can call static method in server side from client side...

server side :

 [System.Web.Services.WebMethod]
 public static void method1()
 {

 }

client side :

 <script language="JavaScript">
     function keyUP() 
     {
         PageMethods.method1();
     }
 </script>
 <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
 </asp:ScriptManager>

It works. Now how do I call non-static method from client side...?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asmx