Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys is it possible to call a function in my code behind using AJAX?
Please provide examples if possible, Thanks in advance!
Posted

I don't think you can call a function in your code behind with AJAX. But you can communicate with the server using the Sys.Net.WebRequest class.

http://msdn.microsoft.com/en-us/library/bb310979.aspx[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 22-Jun-11 14:46pm    
Exactly, my 5.
--SA
raju melveetilpurayil 23-Jun-11 5:55am    
good one. my +5
Yes you can access your code-behind methods (static webmethods)using AJAX. Have a look at this article. He is using JQuery and I don't think that will make a difference to you.

Hope this answers your query!
 
Share this answer
 
v2
There are few ways to interact with server side through client side(Javascript):
1. XMLHttpRequest[^]
2. Callback[^]
3. WebService call[^]
4. PageMethod[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900