Remoting ...

  • Thread starter Thread starter moko
  • Start date Start date
M

moko

I want a javascript in an .aspx page to call a method in a class in the
ASP.NET , C# application. The server side method should return some values,
which will be grabbed by the Javascript, and bound to the fields in the
window.

How can this be done , and is remoting one of the ways to do this ?

Thanks.
 
Not really a remoting scenario since the client is a browser

If I've understood correctly the jscript is running client side in a browser. The easiest technique here is to use the XmlHttp COM object which is part of msxml3 & 4. In the client side script, create the object and issue a get for an aspx which returns the data as XML. The apsx page would need to call your component

There are lots of articles on MSDN - one I found was http://msdn.microsoft.com/msdnmag/issues/0400/cutting/default.asp

This would be an IE specific technique, for cross browser there are a number of 'remote scripting' solutions

If you are using VS Whidbey there are some new controls that wrap all this.
 
Back
Top