help! i have a gridview with checkbox item template. On confirm button click, it will insert the selected rows into the database. But, when i close and run the application again, i want those rows which was previously inserted to the database to remain checked. Means that on page load, those rows that have been inserted into the database to be checked. Please advise. Thanks

Recommended Answers

All 3 Replies

Enclosed your insert code in page load event with IsPostBack.

if(IsPostBack==false) {
    ....
 }

Enclosed your insert code in page load event with IsPostBack.

if(IsPostBack==false) {
    ....
 }

this will help from the postback side. but when i close my web and re-run again, it dissapear...

Create a field in the database preferably bool. Set the value of the newly inserted rows as true. Use it to load the value of he checkbox.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.