我正在使用多视图和 asp 菜单在菜单中创建选项卡。但是通过切换到不同的标签..我在标签上的内容保持不变。以下是代码
<asp:Menu
ID="Menu1"
Width="168px"
runat="server"
Orientation="Horizontal"
StaticEnableDefaultPopOutImage="False"
OnMenuItemClick="Menu1_MenuItemClick">
<Items>
<asp:MenuItem Text="TAB1" Value="0"></asp:MenuItem>
<asp:MenuItem Text="TAB2" Value="1"></asp:MenuItem>
<asp:MenuItem Text="TAB3" Value="2"></asp:MenuItem>
</Items>
</asp:Menu>
<asp:MultiView
ID="MultiView1"
runat="server"
ActiveViewIndex="0" >
<asp:View ID="tab1" runat="server" >
<table width="200" height="100" cellpadding=0 cellspacing=0>
<tr valign="top">
<td class="TabArea" style="width: 600px">
<br />
<br />
TAB VIEW 1
INSERT YOUR CONENT IN HERE
CHANGE SELECTED IMAGE URL AS NECESSARY
</td>
</tr>
</table>
</asp:View>
<asp:View ID="tab2" runat="server">
<table width="200px" height="100px" cellpadding=0 cellspacing=0>
<tr valign="top">
<td class="TabArea" style="width: 600px">
<br />
<br />
TAB VIEW 2
INSERT YOUR CONENT IN HERE
CHANGE SELECTED IMAGE URL AS NECESSARY
</td>
</tr>
</table>
</asp:View>
<asp:View ID="tab3" runat="server">
<table width="200px" height="100px" cellpadding=0 cellspacing=0>
<tr valign="top">
<td class="TabArea" style="width: 600px">
<br />
<br />
TAB VIEW 3
INSERT YOUR CONENT IN HERE
CHANGE SELECTED IMAGE URL AS NECESSARY
</td>
</tr>
</table>
</asp:View>
</asp:MultiView>
通过单击不同的选项卡,我的内容仍然显示第一个选项卡,不知道为什么。
您的帮助将不胜感激