ASP.NET MultiView 控件的问题
我在 asp:MultiView 控件中有一些 asp;View 控件。奇怪的问题是,当我从 View3 移动到 View4 时,View3 中的一些控件在 View4 中可见。为什么 ?这是我第一次出现
<asp:View ID="View3" runat="server">
<br />
<label id="Label1">Test</label>
<br />
<asp:Button ID="RejectButtonGrid" runat="server" Text="Erase1" OnClick="RejectButton_Click" />
<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>
View3 中的按钮在 View4 上可见的问题
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" />
<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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
标记似乎没问题,我认为视图 1 和 2 工作正常?查看代码,我希望视图 3 显示两个按钮“Erase1”和“Accept”,然后对于视图 4,它应该显示两个按钮“Erase 2”和“Accept”...?
为什么视图 4 中的按钮使用“OnCommand”属性而不是像视图 3 中那样使用“OnClick”属性?
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?
也许控件已缓存...
尝试清理文件夹 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET' 文件,然后重试...
Maybe the controls are cached...
try cleaning the folder 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET' Files and try again...