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! |
*******************************************