How to call a C# method from javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • baburk
    New Member
    • Oct 2006
    • 111

    How to call a C# method from javascript

    Hi,

    I am having static method in C#.

    I want to call this method from javascript


    public static void AbandonSession( )
    {

    HttpContext.Cur rent.Session.Ab andon();
    }
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by baburk
    Hi,

    I am having static method in C#.

    I want to call this method from javascript


    public static void AbandonSession( )
    {

    HttpContext.Cur rent.Session.Ab andon();
    }
    Javacsript runs on the client side while C# runs on the server side.
    Perhaps you want to use AJAX?

    Comment

    Working...