I don't know where the LoadPostBackData() event is, or how to "trap & step through" it in order to give you an answer. Is it a page event, or a control event? How do I hook into it? I tried looking for it (must be a hidden event), and I tried Googling...can't
really seem to get an answer to where it is...
LoadPostBackData's an overridable method on a control, not an event, sorry.
BSantiag
On a side note, I know I can set the value anywhere...the problem is that MY value (.Checked = FALSE) is overwritten by the value of the checkbox submitted at the time of the PostBack (.Checked = TRUE). I honestly don't care what the values are of the Checkboxes
at all, I only care about the Postback event and the Checkbox control's ID. It's value I want to discard completely. Problem is I can't seem to figure out how...
Right, what I meant is that Request.Form has all the raw posted back values. Since your checkboxes are being created during OnLoad, they don't get to have their values set by LoadPostBackData, which occurs before the OnLoad event fires. You *can* however
get their value from Request.Form as long as you know their UniqueID. Request.Form["some$control$name"] will either return "true" if the checkbox was checked, or null if it wasn't.
rossisdead2
Participant
1313 Points
300 Posts
Re: Dynamically Created Checkboxes in GridView Retain Old Values
Feb 29, 2012 06:01 PM|LINK
LoadPostBackData's an overridable method on a control, not an event, sorry.
Right, what I meant is that Request.Form has all the raw posted back values. Since your checkboxes are being created during OnLoad, they don't get to have their values set by LoadPostBackData, which occurs before the OnLoad event fires. You *can* however get their value from Request.Form as long as you know their UniqueID. Request.Form["some$control$name"] will either return "true" if the checkbox was checked, or null if it wasn't.