To call aCode behind function from javascript

asp.net , java , javascript Madrid, Spain
  • 13 years ago
    how to call a code behind function (.aspx.cs) from a javascript function in aspx in asp.net

     

  • 13 years ago

    Actually we can call by this method but it wil call only at the page load

    i want to call when a condition becomes true..

    so i declared the method in code behind as [webmethod]

    then from javascript PageMethods.function name we can access that fucntion

     

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Owning a computer without programming is like having a kitchen and using only the microwave oven” - Charles Petzold