Click here to Skip to main content
15,899,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using visual studio 2010 express edition.
I have website with 2 page
- Page 1
- Page 2

What i want to do is when uses click the navigation menu to navigate to page2 it should automatically pop up a prompt windows asking users to input his password, if password is authenticated then they will be given acess to page 2. if no redirect them back to page 1.

Any on know how to do this ??
Posted
Updated 23-Mar-11 19:43pm
v2
Comments
[no name] 24-Mar-11 1:43am    
What you have tried for this? what error it shows?

We can guide you, not to do your homework.
Eduard Keilholz 24-Mar-11 3:16am    
Agree!

On Page2, in Page_Load method, check for logged-in session (A session that you would populate if a user is logged in). In case it is populated, let the user view it or else, redirect him to the login page. On login page, have the username-password thing and once they login into the system, populate the session to track them.

Try!
 
Share this answer
 
v2
Comments
Eduard Keilholz 24-Mar-11 3:16am    
Good answer, my 5!
Sandeep Mewara 29-Mar-11 13:36pm    
Thanks Eduard.
In addition to Sandeep, you may also want to configure your web.config file depending in the type of security you want to use.

Take a peek here[^] for more information about Windows Authentication.
 
Share this answer
 
Comments
Sandeep Mewara 29-Mar-11 13:36pm    
5 to you too for additional useful information shared with OP.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900