Call a server side function from JavaScript!!!

S

Stephen

Hi,

In a form, can we have a client script to call a server side code... what I
am try to say is:

Suppose I have a form with a text box and a button, is it possible to write
a client script (JavaScript) that will call a Code behind function?

Please advice,
Stephen
 
G

Guest

I don't believe you can do that, at least not directly. You'd have to post
back to the server somehow to initiate the call. Maybe set a hidden form
field with a value and then your codebehind can watch for that value and make
the call.
 
G

Girish Bharadwaj

Sorta.. You can use Webservice behaviors (look for it on MSDN) to do client
requests to Server side SOAP APIs.

If you can use .NET 2.0 for this, there are lightweight callback mechanisms
in it for this kind of work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,592
Members
45,104
Latest member
LesliVqm09
Top