|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Catching event in Menu control when bound with sitemapHi Folks,
I am running 2005 c# and I have dynaically built a site map which is autobound to a menu control, but for whatever reasons, i now cannot catch the menu_click event. I think this is maybe due to the fact that the sitemap structure automatically posts it to the new distinct url. I don't think this is right? Has anybody else had problems catching the events? and or solutions? Thanks in advance in the MenuItemDataBound event set the navigateurl to "" to stop the auto
navigation and you'll get the click event. Protected Sub Menu2_MenuItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu2.MenuItemDataBound e.Item.NavigateUrl = "" End Sub Good Luck DWS Show quoteHide quote "Shem" wrote: > Hi Folks, > > I am running 2005 c# and I have dynaically built a site map which is > autobound to a menu control, but for whatever reasons, i now cannot catch the > menu_click event. I think this is maybe due to the fact that the sitemap > structure automatically posts it to the new distinct url. I don't think this > is right? > > Has anybody else had problems catching the events? and or solutions? > > Thanks in advance Thanks a lot mate!
This worked first time and has saved me no end of greef. Thanks again Show quoteHide quote "DWS" wrote: > in the MenuItemDataBound event set the navigateurl to "" to stop the auto > navigation and you'll get the click event. > > Protected Sub Menu2_MenuItemDataBound(ByVal sender As Object, ByVal e As > System.Web.UI.WebControls.MenuEventArgs) Handles Menu2.MenuItemDataBound > e.Item.NavigateUrl = "" > End Sub > > Good Luck > DWS > > "Shem" wrote: > > > Hi Folks, > > > > I am running 2005 c# and I have dynaically built a site map which is > > autobound to a menu control, but for whatever reasons, i now cannot catch the > > menu_click event. I think this is maybe due to the fact that the sitemap > > structure automatically posts it to the new distinct url. I don't think this > > is right? > > > > Has anybody else had problems catching the events? and or solutions? > > > > Thanks in advance
These controls are a real mess
Menu Control building via code .NET multi-column listbox for webpages? javascript within TEMPLATECOLUMNS Other browsers listbox scrollbar behavior - newbie Dynamic Control Unable to find control id referenced by the 'ControlToValidate' Pr Wiring up events... Login Control inheritance issues |
|||||||||||||||||||||||