Menu的MenuItemClick事件问题 我用Menu+MultiView来实现tabpage,在Menu的MenuItemClick事件来控制MultiView的ActiveViewIndex,但是运行时却发现点击MenuItem却没有任何反应,也没有出现postback。不知各位有没碰到过? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 HTML代码如下:<asp:ScriptManager ID="myScriptManager" runat="server"> </asp:ScriptManager> <asp:Menu ID="Menu2" runat="server" BackColor="#E3EAEB" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#666666" OnMenuItemClick="Menu2_MenuItemClick" Orientation="Horizontal" StaticSubMenuIndent="10px" Style="z-index: 100; left: 454px; position: absolute; top: 16px"> <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <DynamicHoverStyle BackColor="#666666" ForeColor="White" /> <DynamicMenuStyle BackColor="#E3EAEB" /> <StaticSelectedStyle BackColor="#1C5E55" ForeColor="White" /> <DynamicSelectedStyle BackColor="#1C5E55" /> <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <Items> <asp:MenuItem Selected="True" Text="Page1" Value="0"></asp:MenuItem> <asp:MenuItem Text="Page2" Value="1"></asp:MenuItem> <asp:MenuItem Text="Page3" Value="2"></asp:MenuItem> </Items> <StaticHoverStyle BackColor="#666666" ForeColor="White" /> </asp:Menu> <asp:UpdatePanel ID="myUpdatePanel" runat="server"> <ContentTemplate> <asp:Panel ID="Panel1" runat="server" BorderStyle="Inset" Height="359px" Style="z-index: 101; left: 454px; position: absolute; top: 35px" Width="435px"> <asp:MultiView ID="MultiView2" runat="server" ActiveViewIndex="0"> <asp:View ID="View4" runat="server"> <asp:Label ID="Label2" runat="server" Style="z-index: 100; left: 1px; position: absolute; top: 27px" Text="myLabel2 test test" Width="253px"></asp:Label> </asp:View> <asp:View ID="View5" runat="server"> <asp:TextBox ID="TextBox2" runat="server" Style="z-index: 100; left: 10px; position: absolute; top: 49px" Width="253px"></asp:TextBox> </asp:View> <asp:View ID="View6" runat="server"> <asp:ListBox ID="ListBox1" runat="server" Height="230px" Style="z-index: 100; left: 84px; position: absolute; top: 45px" Width="196px"> <asp:ListItem>item1</asp:ListItem> <asp:ListItem>item2</asp:ListItem> <asp:ListItem>item3</asp:ListItem> <asp:ListItem>item4</asp:ListItem> </asp:ListBox> </asp:View> </asp:MultiView></asp:Panel> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="Menu2" EventName="MenuItemClick" /> </Triggers> </asp:UpdatePanel> 我没用ajax的UpdatePanel前试过点击Menu的Item时是没有postback动作的,用断点跟踪也发现没有执行到MenuItemClick事件。后来发现Ajax程序都起不了作用,开始以为是Ajax的缘故,于是重装了Ajax,结果还是不行。郁闷…… 数组赋值问题,请高人指点 并发集合类的线程安全问题~~~~ 关于SerialPort类的问题 C#的form一用循环就卡死。。。。。 大家请帮忙,子窗中点击确定按钮时,另外一个子窗口如何显示在主窗口中? 多线程怎么指定一个线程先运行 被要求开发远程教学的软件,请求帮助! 该死的C#调用C++dll问题 求介绍一个c#winfrom项目(中等难度,一个人完成,时间不限) 我是C#的初学者,请各位前辈推荐几本C#的好书 Menu + Ajax问题 请问如何让WebSevice只提供给某些特定的网络上的用户?
</asp:ScriptManager>
<asp:Menu ID="Menu2" runat="server" BackColor="#E3EAEB" DynamicHorizontalOffset="2"
Font-Names="Verdana" Font-Size="0.8em" ForeColor="#666666" OnMenuItemClick="Menu2_MenuItemClick"
Orientation="Horizontal" StaticSubMenuIndent="10px" Style="z-index: 100; left: 454px;
position: absolute; top: 16px">
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#666666" ForeColor="White" />
<DynamicMenuStyle BackColor="#E3EAEB" />
<StaticSelectedStyle BackColor="#1C5E55" ForeColor="White" />
<DynamicSelectedStyle BackColor="#1C5E55" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<Items>
<asp:MenuItem Selected="True" Text="Page1" Value="0"></asp:MenuItem>
<asp:MenuItem Text="Page2" Value="1"></asp:MenuItem>
<asp:MenuItem Text="Page3" Value="2"></asp:MenuItem>
</Items>
<StaticHoverStyle BackColor="#666666" ForeColor="White" />
</asp:Menu>
<asp:UpdatePanel ID="myUpdatePanel" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" BorderStyle="Inset" Height="359px" Style="z-index: 101;
left: 454px; position: absolute; top: 35px" Width="435px">
<asp:MultiView ID="MultiView2" runat="server" ActiveViewIndex="0">
<asp:View ID="View4" runat="server">
<asp:Label ID="Label2" runat="server" Style="z-index: 100; left: 1px; position: absolute;
top: 27px" Text="myLabel2 test test" Width="253px"></asp:Label>
</asp:View>
<asp:View ID="View5" runat="server">
<asp:TextBox ID="TextBox2" runat="server" Style="z-index: 100; left: 10px; position: absolute;
top: 49px" Width="253px"></asp:TextBox>
</asp:View>
<asp:View ID="View6" runat="server">
<asp:ListBox ID="ListBox1" runat="server" Height="230px" Style="z-index: 100; left: 84px;
position: absolute; top: 45px" Width="196px">
<asp:ListItem>item1</asp:ListItem>
<asp:ListItem>item2</asp:ListItem>
<asp:ListItem>item3</asp:ListItem>
<asp:ListItem>item4</asp:ListItem>
</asp:ListBox>
</asp:View>
</asp:MultiView></asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Menu2" EventName="MenuItemClick" />
</Triggers>
</asp:UpdatePanel>