Re: postback resetting checkbox state
- From: "Cowboy \(Gregory A. Beamer\)" <NoSpamMgbworld@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 21 Mar 2008 11:56:30 -0500
Don't rebind the data in Page_Load every time. Use, for example, a If Not
Page.IsPostBack Then and only bind then. The viewstate is reconstituted
prior to Page_Load, so you will overwrite every time if you bind there.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it:
http://gregorybeamer.spaces.live.com/
*************************************************
| Think outside the box!
|
*************************************************
"Chris" <coz1978@xxxxxxxxx> wrote in message
news:15830bb1-9c0d-4ce4-bd99-1bdac2bec778@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I've got a gridview with a column of checkboxes. If I check off any
number of them, and perform a postback, they all go back to being
unchecked. What options do I have for getting around this?
.
- Follow-Ups:
- Re: postback resetting checkbox state
- From: Chris
- Re: postback resetting checkbox state
- References:
- postback resetting checkbox state
- From: Chris
- postback resetting checkbox state
- Prev by Date: Re: Web 2.0 Secrets Revealed
- Next by Date: Re: Web 2.0 Secrets Revealed
- Previous by thread: postback resetting checkbox state
- Next by thread: Re: postback resetting checkbox state
- Index(es):
Relevant Pages
|