AJAX in ASP.NET - How do I check a checkbox and have the action reflected in the database?
- by hamlin11
This is about as beginner as it gets regarding AJAX, but here it goes.
I want to have one checkbox somewhere on an ASP.NET web form (ASPX).
When the user clicks the checkbox, I want one of those spinning indicators to show.
While that spinning indicator is showing, I want an update operation to occur in the database to reflect that the user has intended for that checkbox to be checked.
update MyTable set CheckboxChecked = 1
Then, as soon as the update operation has occurred, I want that to be reflected in the checkbox by removing the spinning indicator and replacing it with the standard checked checkbox.
I'm guessing this is done with an UpdatePanel and possibly an update statement followed by a looped call to a select statement... but I have never used AJAX before and have no idea how to go about it.
Thanks!