How do I use a button to update an ASP table?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jonnyboy26
    New Member
    • Feb 2008
    • 1

    How do I use a button to update an ASP table?

    I have a dynamically populated ASP table. One of the columns in every row is a checkbox. I want the user to be able to check a few of the boxes, then hit the 'update' button. Thus marking the records as done and removing them from the list. The problem I am having is that when the update button is clicked, it does a postback and the data in the table is lost. How can I get a button to not postback? Or how can I keep from losing the data in the table?
  • sanatpalia
    New Member
    • Feb 2008
    • 10

    #2
    In regular asp there is no viewstate like .net. So you have to bind the data (or load in this case) everytime a post back is done. Also to find out what all check boxes were clicked, give the same name to all the checkboxes. And when you try to read teh checkBox value during postback, All the selected Ids would come back with comma seperated.

    Sanat Palia

    Comment

    Working...