Click here to Skip to main content
15,999,717 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created webapplication with 5 aspx pages such as default.aspx,default2.aspx,....,default4.aspx.In these pages default.aspx is login page.And i inserted this in iis local server.and every time i open this website throgh http://10.3.7.84/idea/default.aspx..i pass value of textbox which contains username in login page to all other pages using session.now what i want to do is if i type url as http://10.7.84/idea/default2.aspx it should redirected to login page i.e., default.aspx.


if there is any solution
plz help me.
Posted

Try this on Page_Load event of default2.aspx
C#
if (Session["SessionName"] == null)
           Response.Redirect("~/default.aspx");

Regards..
 
Share this answer
 
thank u........!!!!!!
it is working..
 
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