473,387 Members | 3,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

saving an ASP.net dynamic menu

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
4 2686
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Macamba | last post by:
Hi all, I am currently developing a website for a voluntary organisation. It is my first step in website development. The dynamic menu I developed has some bugs, which I addressed in another...
4
by: Stromboli | last post by:
hi people, My problem is that I need to build a dynamic menu (preferably that works in all the browsers) that appears when I mouseover a certain link. The problem is that I have to declare...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
2
by: vikram | last post by:
I have to design a page which contains a dynamic generated menu at left side.Menu will be generated once a user log in and will remain as it is for the rest of the user session. Problem is that...
19
by: mart2006 | last post by:
I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters what is shown in the dynamic menu....
3
by: RahimAsif | last post by:
I am writing an application that requires the a portion of the main menu to be dynamic. The menu has file, panels, view files and help across the top. The view files sub menu needs to be...
0
by: benfly08 | last post by:
Hi, I used SWT to develop an windows application. In the application there is a dynamic created popup menu. The dynamic part is that i will pass a list of name to be a submenu of one menu item....
10
by: mart2006 | last post by:
Hi, I'm fairly new to PHP and I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.