PC Review


Reply
Thread Tools Rate Thread

Build C# menu system

 
 
hon123456
Guest
Posts: n/a
 
      18th Nov 2009
Dear all,

I want to write a c# web page to change the menu
displayed
in the main page.


What I want is I can Add,delete or modify the main menu, add, delete
or modify submenu. Or change the menu. Now the menu is generated with
web.sitemap file. So I want to write the menu
system based on web.sitemap. But I would also like to have other
method, for example, by text or
by database. The main purpose is that I can edit menu, add menu and
sub menu or change it.


Please reply me on where I can download any sample code. Or would u
please give me some advice or details on how to implement it.


thanks


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      18th Nov 2009
On Nov 18, 3:08*pm, hon123456 <peterhon...@yahoo.com.hk> wrote:
> Dear all,
>
> * * * * * * I want to write a c# web page to change the menu
> displayed
> in the main page.
>
> What I want is I can Add,delete or modify the main menu, add, delete
> or modify submenu. Or change the menu. Now the menu is generated with
> web.sitemap file. So I want to write the menu
> system based on web.sitemap. But I would also like to have other
> method, for example, by text or
> by database. The main purpose is that I can edit menu, add menu and
> sub menu or change it.
>
> Please reply me on where I can download any sample code. Or would u
> please give me some advice or details on how to implement it.
>
> thanks


You might want to look at the following examples:

http://bytes.com/topic/asp-net/answe...rogramatically
http://harriyott.com/2007/03/adding-...pnet-site.aspx
 
Reply With Quote
 
Gregory A. Beamer
Guest
Posts: n/a
 
      18th Nov 2009
hon123456 <(E-Mail Removed)> wrote in news:ec8defbf-b9e2-4b79-
9eea-(E-Mail Removed):

> What I want is I can Add,delete or modify the main menu, add, delete
> or modify submenu. Or change the menu. Now the menu is generated with
> web.sitemap file. So I want to write the menu
> system based on web.sitemap. But I would also like to have other
> method, for example, by text or
> by database. The main purpose is that I can edit menu, add menu and
> sub menu or change it.


Before going forward, the question is WHY? Why do you need a dynamic
menu?

If it is because different users, based on authentication, see different
items, then use security trimmings rather than dynamically dink with the
menu. You can set up each node to correspond to certain roles and by
setting security trimmings to true, you can have it respect.

An even better option is to put the secure pages in their own folder,
with a locked down web.config. The system automatically respects these
settings, and it is, imo, more maintainable than constantly whacking the
sitemap, as you are working in isolation with the secured pages.

If this is not why you are doing this, then other answers might apply.
My personal choice for a truly dynamic menu would be move away from
sitemap and use a database with a custom sitemap provider.

Peace and Grace,
Greg

--
Vote for Miranda's Christmas Story
http://tinyurl.com/mirandabelieve

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
build menu system hon123456 Microsoft C# .NET 1 18th Nov 2009 01:25 PM
build context menu from menu strip parez Microsoft C# .NET 2 2nd Jun 2008 05:49 PM
build context menu from menu strip parez Microsoft Dot NET Framework Forms 0 2nd Jun 2008 04:35 PM
[visual studio 2003 build system] incremental build not optimal? Thorsten Ottosen Microsoft C# .NET 4 5th Aug 2005 08:35 AM
How to display the system menu on the taskbar without a titlebar or system menu button Will Pittenger Microsoft C# .NET 2 15th Apr 2004 05:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:21 PM.