Wednesday, March 21, 2012

Write to database using AJAX

Hello, everyone. I'm trying to finish up a project where users store information into our sales database. It would be immensely helpful to be able to insert this data (or update the data) without refreshing the page, which I can only imagine would use AJAX. Unfortunately, I'm having a hard time finding the proper information on how to do this. Is there a handy little AJAX control that helps with this? Is it something I'll have to write myself? Any hints, suggestions and/or pointings in the right direction would be greatly appreciated.

not sure on what you have, but you do have several options:

1. use web services to do that. you'd call them through your page by using js proxies that can be automatically inserted on the page.

2. use an updatepanel to wrap parts of the page that should be refreshed.


Luis Abreu:

1. use web services to do that. you'd call them through your page by using js proxies that can be automatically inserted on the page.

This is precisely what I'm going to try to use. Seems cleaner to me and I think I understand it better than the updatepanel. Thanks for the information! I really appreciate it.


hello again.

yes, if you ask me, the correct way of using ajax it to use web services to get the data and then js to update the dom presented by the browser. anyway, you cannot deny that the UpdatePanel has some cool things and it'll work nicely in several scenarios.

No comments:

Post a Comment