Click here to Skip to main content
15,905,967 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi
I am developing an application in that if i copy & paste the url of my other pages i should redirect it to the login page how to do it
Posted

use query string to check whether the coming page is having that query string.
If thier is a query string then the page is directed as your wish.

But if you directly type the url of the page you will not get query string in and hence you can redirect him to login page.


Hope it will help.
Feel free to ask any question.
 
Share this answer
 
Hi


you can also check the session variable for that put a session variable with login name and check it on every page.it will solve the problem for session expiry also

step 1 : add Session.add("LoginName") = txtUsername.text
( On the login page)

step 2 : Check if session has the value in logi name on each page
if not fount redirect to the login page
( On each page)

Feel free for further question if not working for you..
 
Share this answer
 

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