By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,708 Members | 1,576 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,708 IT Pros & Developers. It's quick & easy.

saving an ASP.net dynamic menu

P: n/a
Does anyone know the best way to handle passing a dynamic menu
generated from a login from one asp.net page to another. Would it be
better to recreate the menu on each page? Save the menu as a string
into a session variable upon login? Any other way to do this I may be
missing?
This menu is part of an intranet. The user logs in, checks SQL
database for folder permissions, then scans web directories for all
folders which match permissions and lists all files and folders under
them to create a menu tree. From what I've been reading, frames aren't
the best solution anymore...Any ideas?

-Spx27
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
i would put the menu in a user control and just include the user control in
each page rather than passing it about or storing it as a string.
that way you just have to write code to create the menu at one place (in the
user control). and a simple dropping the control in aspx pages does the job.

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"spx27" <sp**********@hotmail.com> wrote in message
news:4f**************************@posting.google.c om...
Does anyone know the best way to handle passing a dynamic menu
generated from a login from one asp.net page to another. Would it be
better to recreate the menu on each page? Save the menu as a string
into a session variable upon login? Any other way to do this I may be
missing?
This menu is part of an intranet. The user logs in, checks SQL
database for folder permissions, then scans web directories for all
folders which match permissions and lists all files and folders under
them to create a menu tree. From what I've been reading, frames aren't
the best solution anymore...Any ideas?

-Spx27

Nov 18 '05 #2

P: n/a
You probably don't want to have to rescan the entire folder structure every
time a page loads. So it sounds like you would want to store this
information in a session variable - maybe as some XML, or whatever is
appropriate.

"spx27" <sp**********@hotmail.com> wrote in message
news:4f**************************@posting.google.c om...
Does anyone know the best way to handle passing a dynamic menu
generated from a login from one asp.net page to another. Would it be
better to recreate the menu on each page? Save the menu as a string
into a session variable upon login? Any other way to do this I may be
missing?
This menu is part of an intranet. The user logs in, checks SQL
database for folder permissions, then scans web directories for all
folders which match permissions and lists all files and folders under
them to create a menu tree. From what I've been reading, frames aren't
the best solution anymore...Any ideas?

-Spx27

Nov 18 '05 #3

P: n/a
Agreed.
Though hopefully the user control will not have to rescan all those
directories and do all the work of figuring out permissions on every page
load, but will be able to get its info from session, or elsewhere, to speed
up the menu creation.

"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:u9*************@TK2MSFTNGP09.phx.gbl...
i would put the menu in a user control and just include the user control in each page rather than passing it about or storing it as a string.
that way you just have to write code to create the menu at one place (in the user control). and a simple dropping the control in aspx pages does the job.
--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"spx27" <sp**********@hotmail.com> wrote in message
news:4f**************************@posting.google.c om...
Does anyone know the best way to handle passing a dynamic menu
generated from a login from one asp.net page to another. Would it be
better to recreate the menu on each page? Save the menu as a string
into a session variable upon login? Any other way to do this I may be
missing?
This menu is part of an intranet. The user logs in, checks SQL
database for folder permissions, then scans web directories for all
folders which match permissions and lists all files and folders under
them to create a menu tree. From what I've been reading, frames aren't
the best solution anymore...Any ideas?

-Spx27


Nov 18 '05 #4

P: n/a
Marina,

Couldnt agree more with you. my bad (I have this problem i scan the topic
rather than reading it.) so in this instance i read parts of the first
paragraph and left the rest.

i saw your message and kicked myself hard for the nth time :) thought i will
wait till someone pointed the mistake
yes in case you have to scan the directory etc with permissions then it
would be better if you just did it once and then stored it in a session.

again if you use a user control you can scan the session for an ArrayList
say of all things the users have access to. if you dont find it (the first
time after login) then build it and store it in the session and move on.
You can use this array list to build the menu.
So next time when you come the code can pick it up from the session and then
get on with menu creation.

Thanks Marina

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Marina" <so*****@nospam.com> wrote in message
news:eY*************@TK2MSFTNGP11.phx.gbl...
Agreed.
Though hopefully the user control will not have to rescan all those
directories and do all the work of figuring out permissions on every page
load, but will be able to get its info from session, or elsewhere, to
speed
up the menu creation.

"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:u9*************@TK2MSFTNGP09.phx.gbl...
i would put the menu in a user control and just include the user control

in
each page rather than passing it about or storing it as a string.
that way you just have to write code to create the menu at one place (in

the
user control). and a simple dropping the control in aspx pages does the

job.

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"spx27" <sp**********@hotmail.com> wrote in message
news:4f**************************@posting.google.c om...
> Does anyone know the best way to handle passing a dynamic menu
> generated from a login from one asp.net page to another. Would it be
> better to recreate the menu on each page? Save the menu as a string
> into a session variable upon login? Any other way to do this I may be
> missing?
> This menu is part of an intranet. The user logs in, checks SQL
> database for folder permissions, then scans web directories for all
> folders which match permissions and lists all files and folders under
> them to create a menu tree. From what I've been reading, frames aren't
> the best solution anymore...Any ideas?
>
> -Spx27



Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.