Menu in a website
i have to make an asp.net website project in c#. i must include a menu bar with File-New,Open;Edit-.. etc..it must be written in c#? can i include an existing menu? this menu helps me to load/view/edit xml files in a textbox.Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit ChoudharyRank #145 · 15.8K reputationPosted Mar 16, 2011, 4:28 AM EDT
Here is the code to create the menu in asp.net
Handle the Menu Item click event like this: and add and handler in the .aspx.cs file protected void Menu1_MenuItemClicked(Object sender, System.Web.UI.WebControls.MenuEventArgs e) { switch(e.Item.Value) { case "New": //Do what ever you want return; case "Open": //Do what ever you want return; case "Edit": //Do what ever you want return; } } Hope this was helpful. Don't forget to mark "Do you like this answer" if it really helped you. Thanks.Andrew FensterRank #983 · 2K reputationPosted Mar 16, 2011, 6:15 AM EDT
I wrote an article about how to do a CSS based menu with a master page. http://www.c-sharpcorner.com/UploadFile/afenster/3737/?ArticleID=ff88cb27-6a0a-4407-a186-df1ebc38a1ea It has a downloadable example. That's another way. There are plenty of other ways besides these two. A quick search on the Internet will reveal hundreds of articles about how to do a menu. You should spend a little while browsing through them.
Here's a website I really like: http://www.dynamicdrive.com/style/csslibrary/category/C1/