This is the point where I will be loosing major geek credits, but please bear with me.
My expectation here is that I set a list of objects as the DataSource of some data control on the first GET operation. When a POST operation occurs, I don't want to overwrite the user's modifictaion on my dataControl, so I expect it to load from the ViewState.
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
dataControl.DataSource = GetCustomers();
dataControl.DataBind();
}
Response.Write("dataControl.DataSource = " + dataControl.DataSource);
}
On PostBack, the control renders with the same data, but when I test the dataControl.DataSource, it is null.
|
First GET operation
|
On postback
|
Somewhere here, my reasoning is flawed. Where did I go wrong?
What do I need to do to capture the user's clicks on the checkboxes (other than enabling them ;-)?