ASP.NET A problem with the MultiView control
I have some asp;View controls in asp:MultiView control. The strange problem is, when I move from View3 to View4, some controls from the View3 are visible within View4. Why ? It's the first time I occur that problem
<asp:View ID="View3" runat="server">
<br />
<label id="Label1">Test</label>
<br />
<asp:Button ID="RejectButtonGrid" runat="server" Text="Erase1" OnClick="RejectButton_Click" />
开发者_如何学C<asp:Button ID="AcceptButtonGrid" runat="server" Text="Accept" OnClick="AcceptButton_Click" />
</asp:View>
<asp:View ID="View4" runat="server">
<asp:Button ID="RejectButtonDuplicates" runat="server" Text="Erase2" OnCommand="RejectButtonDuplicates_Command"/>
<asp:Button ID="AcceptButtonDuplicates" runat="server" Text="Accept" OnCommand="AcceptButtonDuplicates_Command"/>
<br />
<asp:Button ID="BackButton" runat="server" Text="Go back" OnClick="BackButton_Click"/>
</asp:View>
Buttons from View3 are visible on View4
The markup seems to be ok, I presume views 1 and 2 are working fine? Looking at the code I would expect view 3 to show two buttons "Erase1" and "Accept", and then for view 4 it should show two buttons with "Erase 2" and "Accept"...?
Why are the buttons in view 4 using the 'OnCommand' attribute instead of 'OnClick' as they do for view 3?
Maybe the controls are cached...
try cleaning the folder 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET' Files and try again...
精彩评论