Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
414
Best way to code the server side menu click event?
posted

I just learned that ignav:item's cannot have a "ID" property (why?).
In the provided online samples I saw you used a switch case with e.Item.Text - this is not an option in our application (it is localized and so I don't know the current text to switch). We also cannot use the index, because the items vary with the LoginView templates.

So how can we detect the clicked item in the postback processing of the click event?

Parents
No Data
Reply
  • 4493
    posted

     Hello Torsten,

    You can try usiung the "Tag" property. Since it is of type Object, you can set it any value (preferably unique), so you can easily check/switch it in the event handler, like this:

        protected void UltraWebMenu1_MenuItemClicked(object sender, Infragistics.WebUI.UltraWebNavigator.WebMenuItemEventArgs e)
        {
            int clickedTag = int.Parse(e.Item.Tag.ToString());
            switch(clickedTag)
            {
              ///Put your logic here.
            }
        }

     

    Hope this helps!

Children