|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I run a server side method from javascript?!I have a problem that I need to be able to run a server side method
(MyMethod()) from a javascript script. For example: <script language="javascript"> confirmValue = confirm("Do you wish to save?"); if(confirmValue) run MyMethod() here </script> There must be a way to do this, but how? Thanks in advance for your help. Steve Hi Steve,
If you are using ASP.NET 2.0, you may use the ICallbackEventHandler interface. Here is an example: http://bitarray.co.uk/ben/articles/234.aspx On Thu, 22 Dec 2005 08:46:14 -0800, Steve Kershaw wrote:
Show quoteHide quote > I have a problem that I need to be able to run a server side method There is AJAX as well as ICallbackEventHandler.> (MyMethod()) from a javascript script. For example: > > <script language="javascript"> > > confirmValue = confirm("Do you wish to save?"); > if(confirmValue) > run MyMethod() here > > </script> > > There must be a way to do this, but how? > > Thanks in advance for your help. > > Steve For a very complete and elegant AJAX implementation look up AJAX.NET http://ajax.schwarz-interactive.de/
Other interesting topics
Loading UserControl using New Contructor
vs2005 debugging on ws2k3 server Storing an array to a Session How to change the timeout value PreRender event question Virtual Directory 2.0 height %'s not working When does Application_AuthenticateRequest fires? Path conversion self-signed certificate for Windows XP |
|||||||||||||||||||||||