View Full Version : Call server-side methods from javascript

02-27-2007, 01:38 PM
Hi! I'm new so please forgive me I haven't posted it in the right place as I didn't know where to put this post

My problem is that I am using a confirmation window with the javascript window.confirm() but my page is done with asp.net and if the confirmation window answer is YES, i would like to change all the data I have in the client's session.
I've thought to call an vb method in the server-side to do that because I don't know how to change client's session, but I don't know how to do it as if I write the methods name it does not executes enything

Does anyone know a way to do that??


02-27-2007, 03:33 PM
If confirm is true, allow postback and change it on the server.
OR you can get into the whole AJAX thing. Whichever you prefer.
If you're using 1.1, stick with postback. 2.0 has a lot more support for asynchronous methods and AJAX.