Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Build C# menu system

Reply
Thread Tools

Build C# menu system

 
 
hon123456
Guest
Posts: n/a
 
      11-18-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
 
      11-18-2009
On Nov 18, 3:08*pm, hon123456 <(E-Mail Removed)> 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
 
      11-18-2009
hon123456 <(E-Mail Removed)> wrote in news:ec8defbf-b9e2-4b79-
http://www.velocityreviews.com/forums/(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

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
Lost System Restore in the System Tools menu hamsatuk@hotmail.com Windows 64bit 3 05-03-2007 04:48 PM
Not Buid errors when build, yes build erros when deploy, why? Pedro Mir ASP .Net 2 06-20-2006 02:26 AM
Build a Better Blair (like Build a Better Bush, only better) Kenny Computer Support 0 05-06-2005 04:50 AM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
How to build ASP.NET projects on a separate build machine? Vagif Abilov ASP .Net 2 07-07-2004 04:34 PM



Advertisments