How to call a c# method in javascript function directly. (eg page_load
method of code behind page). Please help me.
相关问题
- Is there a limit to how many levels you can nest i
- Sorting 3 numbers without branching [closed]
- How to toggle on Order in ReactJS
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
To call a server side method on a client side event you need to do the following:
1- Create the server side method:
2- Implement the
System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
which take one string argument (You can assign the name to the value of this argument).:3- Write a script to trigger post back:
4- Call the PostBack trigger function when needed: