I’m new to ASP.NET (I’m a PHP developer) and I’m trying to understand how to use AJAX in ASP.NET.
In PHP was simple: Create an async request to an PHP page and the response is placed in a div.
But in ASP.NET how it should be done? Create a async request to an aspx page and place the logic in the Load event? Useing an ASP.NET Handler/ASP.NET Module?
What about the Telerik Ajax? I’ve seen that in an RadAjaxManager you specify the controller that makes the request, the controller that will be modified by the response but I don’t see where to put the logic, how to return a response…
The telerik demos were to complex and I didn’t understood anything.
I’m simply not able to understand how telerik ajax works because I don’t see the things that I’m seeing when programming ajax in javascript…
thanks!
How I use Ajax within ASP.NET is just like PHP, the only thing is I call a webmethod. This way the Ajax call does not have to go through the whole process with all the init, load, prerender, etc. This is way faster then doing a call to a normal ASP.NET page.
My experience with Telerik is that it’s really slow and bad for your performance if you want a simple Ajax call.
Below I give a simple example how you can do it:
For C#
For VB:
Your Javascript:
For more information: