Home All Groups Group Topic Archive Search About

How to access aspx page thru the menu control only?

Author
7 Apr 2005 8:19 PM
ValK
Hello,
I'm using a skmMenu control on my asp.net pages. When user login to the
application, I display menu items based on user security roles. So regular
user will not see 'Admin' menu items, but if you know url for admin page then
user can access easily. How can I make all users navigate only thru the menu
control.

Thanks,

Valk

Author
8 Apr 2005 6:40 AM
Cor Ligthert
ValK,

Normally is that done, by accessing those pages after a login as well
(however with an other username and password), so what is the difference.

Cor
Author
8 Apr 2005 12:13 PM
ValK
OK. Lets say you are admin and i'm a regular user. We both are valid users
and we both will pass the login page. Only the difference that we will see a
different menu items. You will see 'Admin' menu that points to the admin page
and I will not. But if I know the url for admin page
(http://servername/appname/admin.aspx) I can access it with out using menu.




Show quoteHide quote
"Cor Ligthert" wrote:

> ValK,
>
> Normally is that done, by accessing those pages after a login as well
> (however with an other username and password), so what is the difference.
>
> Cor
>
>
>
Author
8 Apr 2005 12:35 PM
Cor Ligthert
Valk,

Maybe I understand you wrong, however why not a login page before that?

And than in your origial page something as

if session.item("user") not is "WhatEver" than me.close in the load event.

Cor
Author
8 Apr 2005 2:11 PM
ValK
Cor,
Thank you for trying to help. This is exactly what I was thinking of. When
user login to the application I will need to set a session.item based on user
role. Something like Session.Item("UserRole") =
myDataTable.Rows(0).Item("Role") and then later check this value on Load
event of the admin page. Just like you do in your message.

Is this would be the best way to handle this situation or there is another
options? I'm a new to this and I would like to write this application in most
efficient way.

Thanks again.

Valk






Show quoteHide quote
"Cor Ligthert" wrote:

> Valk,
>
> Maybe I understand you wrong, however why not a login page before that?
>
> And than in your origial page something as
>
> if session.item("user") not is "WhatEver" than me.close in the load event.
>
> Cor
>
>
>
Author
8 Apr 2005 2:28 PM
Cor Ligthert
Valk,

The nice thing from what we do is that there is foreever a better way.
Almost everyday when I visit these newsgroups I see a messages from which I
think, that I never thought about.

And because there is a better way, there is no best way.

Check if your method does what it has to do until you see a better method,
and use that in your next problem, not in the old which does what it has to
do.

Just my thought,

Cor
Author
8 Apr 2005 3:29 PM
ValK
I got you.....
Thanks allot

Valk

Show quoteHide quote
"Cor Ligthert" wrote:

> Valk,
>
> The nice thing from what we do is that there is foreever a better way.
> Almost everyday when I visit these newsgroups I see a messages from which I
> think, that I never thought about.
>
> And because there is a better way, there is no best way.
>
> Check if your method does what it has to do until you see a better method,
> and use that in your next problem, not in the old which does what it has to
> do.
>
> Just my thought,
>
> Cor
>
>
>