![]() |
| ||
| Calling C# function through Javascript in ASP.NET Hi Guys, Is it possible to call the C# function from Javasript...... Sushil Kumar :rolleyes: |
| ||
| Re: Calling C# function through Javascript in ASP.NET Not directly, no. Server-side functions live server-side, client-side functions live on the client. In fact, the only way to get ANY server-side code to run, is to submit the form. ASP.NET unrolls the HTTP headers, unpackages the hidden ViewState variable, re-instantiates objects, and then decides what events to raise based on all of the above. What you can do is have your JavaScript function set a hidden form variable, then do a form.submit(). Then, in your Page_Load handler on the server, use the Request object to check for the presence and/or value of this variable, and call the appropriate server-side method. |
| ||
| Re: Calling C# function through Javascript in ASP.NET Quote:
|
| ||
| Re: Calling C# function through Javascript in ASP.NET You're a little late serk.. :) Aug 24th, 2005 |
| ||
| Re: Calling C# function through Javascript in ASP.NET you can do this. please visit this article . i thing it would be help full to you. http://sappidireddy.wordpress.com/20...n-aspnet-ajax/ |
| ||
| Just a quick thought here. Vfp programmer learning C#, .net, etc. Even with the time differences on the post I found it really helpfull on my learning curve. Thanks guys!!! Oct 27, 3009! |
| ||
| ||
| Quote:
|
| All times are GMT -4. The time now is 2:08 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC