Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
sir,
i am doing one application.In that i am having 10 forms.
For example newlead.aspx,newproduct.aspx,login.aspx like that.
If i can set start page as newlead.aspx or some other form and then debug then i want to get the login page only.
How it's possible.


Any body plz help about this.

thanks in advance
Posted
Updated 28-Jun-11 21:06pm
v2
Comments
OriginalGriff 29-Jun-11 3:00am    
Sorry, but that just isn't clear.
Use the "Improve question" widget to edit your question and provide better information.

Go to Solution Explorer.
Right click on the login file(ex.login.aspx) and click Set AS Start Page.
 
Share this answer
 
Set Login.aspx as "Set As Start Page"
 
Share this answer
 
On the pageload of all the other pages except login page, check for the session variable. If session is null redirect it to the login.aspx page.

Code to put in page load

if(Session["yoursessionkey"] == null)
    Response.Redirect("Login.aspx");


Hope it helps
 
Share this answer
 
Comments
leelavathikuna 29-Jun-11 3:36am    
thanku sir.
but what happened is in lead 2 links new leads and view all leads are there.
when i am clicking those links then also it will go to login page.
but i need only when debug our application then only login page wil get.
Ra-one 29-Jun-11 4:54am    
In the pages you do not want to redirect it to login page remove the piece of code given above. So it will not redirected. try it...

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