Calling server-side methods from client-side event

Hello,

i'm novice in asp.net client-side script and i have a simple question: is it possibile to call a server-side method (ex. c# managed code) from a java script client-side function linked to an event?

Thanks all

 


Luca Guccione
Genova, Italy
0 lucaguccione 10/22/2008 12:56:27 PM

Yes you can. It's very easy using web methods from code behind, jquery and the script manager. See this very good blog post explaining the steps:

http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/
 



mySoZa
0 zahsot 10/22/2008 1:50:10 PM

lucaguccione:

Hello,

i'm novice in asp.net client-side script and i have a simple question: is it possibile to call a server-side method (ex. c# managed code) from a java script client-side function linked to an event?

Thanks all

 

The only way is by using AJAX or a PostBack.

NC...

 

0 NC01 10/22/2008 2:24:29 PM

HI lucaguccione

I agree with NC, the link post by zahsot show us how to do an AJAX call by jQuery, not really "directly".

Thanks.


Lance Zhang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0 Lance 10/27/2008 11:20:22 AM

Lance Zhang - MSFT:

HI lucaguccione

I agree with NC, the link post by zahsot show us how to do an AJAX call by jQuery, not really "directly".

Thanks.

It also doesn't relate very well to a novice as 1. You need to understand AJAX and 2. you need to know JQuery, neither being that easy for even veterans in web applications.

NC...

 

0 NC01 10/27/2008 12:06:19 PM
Reply:

(Thread closed)