S
Sam Kuehn
I have been stuck on this for some time and am desperate for a solution. I run into this all of the time! I will give a over simplified example to illustrate the problem. Say you have 2 user controls on a web form. One for inputing data (like a line item to an order) and one to display the detail data (a data grid with all line items the order). So, you input data into the input form, then click the add button. The from in posted back. Naturally you would want the newly added line to show up in the detail user control when the form is refreshed. The problem is it probably will not. Why? Because the event handler for the add button will be called after the data grid (or repeater whatever) has been bound (Assuming you are doing the data binding for the grid in the Page_Load event handler of the detail control). So basically the detail grid is created and THEN the line is added. In this simple situation you could probably work around it (Response.Redirect back to itself but then you loose view state which in undesirable). As you can imagine the problem gets quite complicated when you have many many user controls on a page. What is the answer to this? Is my architecture fundamentally flawed and this structure is no good? HELP!