Embedding multiple user controls into a page?
<p>I've embedded multiple user controls into the same page. The user controls typically have 2 different views, an edit/default view and a completed view. When the user completes an edit then I switch the MultiView to the completed state. This pattern works okay in pages.</p>

<p>The problem is when I go back to the master view/page then the user brings back the control, the view is still in the completed state.</p>

<p>What are some simple methods for resetting/correcting the multiview state? I could have a Reset() function on every control but it feels like I may be able to avoid that.</p>

<p>Update:</p>

<p>This page is designed to show an account/profile view and it has the following parts:</p>

<pre><code>&lt;asp:MultiView&gt;
...read only view 
&lt;asp:EmailEditView&gt;
&lt;asp:AccountEditView&gt;
</code></pre>

<p>etc..</p>

<p>And then each of those views has a user control. Inside the user control, we have something like this</p>

<pre><code>&lt;asp:multiview&gt;
&lt;asp:view id="edit"/&gt;
&lt;asp:view id="completed"/&gt;
</code></pre>

<p>I've found the following problems with this design:</p>

<ol>
<li><p>When the user completes an action of user control such as changing an email. The view stays in the finished state even when they go back to it a second time.</p></li>
<li><p>When the user goes back to the original form the data is stale. This design really screws with the postback mechanism. If I don't use !IsPostBack on the main form for databding then my dropdownlist on the sub forms will not work. However, once I add the !isPostBack on the main form then the data becomes stale.</p></li>
</ol>

<p>I can add a "reset" flag to every user control and add something like this</p>

<pre><code>if ((!IsPostback) || (reset) )
</code></pre>

<p>As well as resetting the view. In the other scenario, I can add an event handler to load the reload/bind the data when the user clicks "back", i.e where I change the form back.</p>
