Click here to Skip to main content
16,019,532 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I have dynamically populated menu items in my content page(menu items are document names which when clicked open a document which is populated from database),now I want to populate the data from database when I click on any item of the dynamic menu I populated(say I want to populate data by calling a stored procedure by passing menu item ID to it)

Is there a click event handler for menu items in dynamic menu.

Suggestions or solutions would be appreciated

Thanks!!!!!!!
Posted
Comments
Sergey Alexandrovich Kryukov 30-Oct-12 21:50pm    
Suggestions for what, for goodness sake? You did not explain any single problem. What did you try? Any difficulties?
--SA

1 solution

Not sure if I am understanding your problem correctly. But, assuming you have a menu control, and it is dynamically populated items menu with the document name, you can do sty like this:
You can set the MenuItemClick event of the Menu from the properties window. Then in the code behind, you can do sth like:
C#
protected void Menu1_MenuItemClick(Object sender, System.Web.UI.WebControls.MenuEventArgs e)
{
  string documentName = e.Item.Value;
  // do sth with the document name
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900