How to access aspx page thru the menu control only?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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.
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top