0

I want to know whether there is any better option to perform AJAX operations in my ASP.net webforms other than Updatepanel. Because updatepanel sends lot of viewstate data in the request which in term affects the peroformace of the Application.

Thank You in Advance

zed
  • 2,298
  • 4
  • 27
  • 44
Akhil R J
  • 184
  • 2
  • 14

1 Answers1

3

You have a few options. You can disable ViewState, or you can use "plain AJAX".

If you choose to use "plain AJAX", you can write your low level JavaScript code or use libraries such as jQuery to make the AJAX calls easier.

On the server side, you'll need to expose some kind of endpoint for the AJAX calls to communicate to. Some people use WebMethod, but that has been deprecated and I would avoid this approach. You can use ASP.NET Web API in .NET 4.5, or in any version of .NET you can use handlers or generic handlers (.ashx) to expose endpoints.

Community
  • 1
  • 1
mason
  • 31,774
  • 10
  • 77
  • 121
  • @manson : thanx for the guidence , as i am new to programming could u please provide me some refrence where i could learn Web API. – Akhil R J Jul 23 '15 at 09:15
  • @AkhilRJ As always, the best place to start is your favorite search engine. Try searching for "asp.net web api". – mason Jul 23 '15 at 12:56