Posted on 2006-07-20
I have two drop down lists on one page, I have a base class that exposes properties for the form values so that they can be used throughout the request.
Here are the drop down selected index changed methods:
protected void ddProducts_Changed(object sender, EventArgs e)
if (int.Parse(ddProducts.SelectedItem.Value) == 0)
protected void ddClients_Changed(object sender, EventArgs e)
editCardDesign.ClientId = int.Parse(ddClients.SelectedItem.Value);
when i put a watch on BuildCardDesignDropDown call, the editCardDesign.ClientId is 0, but the client drop down list appears before the card drop down list and therefore sets the editCardDesign.ClientId.
I believe this is being caused by the page posting a post back when the user selects a client (drop down), but I thought that setting my exposed property would then still be available later on.