|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Menu control MenuItemClick does not fire.Inherits="UC_MainMenu" %> <!-- OnMenuItemClick="Menu1_MenuItemClick"> --> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="StaticMenuStyle"> <tr> <td valign="top"> <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" DynamicVerticalOffset="0" DynamicHorizontalOffset="0" StaticEnableDefaultPopOutImage="false" StaticItemFormatString="{0}" ItemWrap="true"> <StaticMenuItemStyle CssClass="StaticMenuItemStyle" /> <StaticHoverStyle CssClass="StaticMenuHoverStyle" /> <DynamicMenuStyle CssClass="DynamicMenuStyle" /> <DynamicMenuItemStyle CssClass="DynamicMenuItemStyle" /> <DynamicHoverStyle CssClass="DynamicHoverStyle" /> </asp:Menu> </td> <td width="100%" valign="top"> <div class="StaticMenuItemStyle"></div> </td> </tr> </table> And here is the VB routine: Public Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As MenuEventArgs) Handles Menu1.MenuItemClick Dim message As String ' Display the text of the menu item selected by the user. message = "You selected " & e.Item.Text & "." End Sub I Don’t see an AutoPostBack property for the menu control. I have tried delcaring the routine as private and public, adding and removing the Handles clause and adding and removing the OnMenuClick clause in the ASPX. None of it seems to make any difference. The routine never seems to run. Can anyone help? Thanks, nickpup Add MenuItems that do not set a value for the NavigateUrl property.
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menu.menuitemclick(VS.80).aspx Show quoteHide quote "nickpup" wrote: > <%@ Control Language="VB" AutoEventWireup="false" CodeFile="MainMenu.ascx.vb" > Inherits="UC_MainMenu" %> > <!-- OnMenuItemClick="Menu1_MenuItemClick"> --> > > <table width="100%" border="0" cellpadding="0" cellspacing="0" > class="StaticMenuStyle"> > <tr> > <td valign="top"> > <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" > DynamicVerticalOffset="0" DynamicHorizontalOffset="0" > StaticEnableDefaultPopOutImage="false" > StaticItemFormatString="{0}" ItemWrap="true"> > <StaticMenuItemStyle CssClass="StaticMenuItemStyle" /> > <StaticHoverStyle CssClass="StaticMenuHoverStyle" /> > > <DynamicMenuStyle CssClass="DynamicMenuStyle" /> > <DynamicMenuItemStyle CssClass="DynamicMenuItemStyle" /> > <DynamicHoverStyle CssClass="DynamicHoverStyle" /> > > </asp:Menu> > </td> > <td width="100%" valign="top"> > > <div class="StaticMenuItemStyle"></div> > </td> > </tr> > </table> > > > And here is the VB routine: > Public Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As > MenuEventArgs) Handles Menu1.MenuItemClick > Dim message As String > ' Display the text of the menu item selected by the user. > message = "You selected " & e.Item.Text & "." > > End Sub > > I Don’t see an AutoPostBack property for the menu control. > I have tried delcaring the routine as private and public, adding and > removing the Handles clause and adding and removing the OnMenuClick clause in > the ASPX. None of it seems to make any difference. The routine never seems > to run. Can anyone help? > Thanks, > nickpup > >
formview with objectDataSource won't display data
Web UserControl DropDownlist control event not working... generating textboxes on the fly ASP.Net (2003) bug with gridview.selectedvalue? How to refresh a dropdownlist inside a DetailsView? Create a word like doc from C#.NET multiView vs panel Hidden input field named "__EVENTVALIDATION" GridView W/Drop Down List Question Bound RadioButtonList problem |
|||||||||||||||||||||||