Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have login page.if i login then it redirect to profile page..but i have search chart when i click on chart that time if i am not login user then i have to login and show the same page means searching chart...means i have redirect two different pages which is depending on condition.when i login whtever data in searching chart same data comes after login. plz help me?
Posted
Updated 28-Dec-12 0:21am
v3

1 solution

You can use Session object for that, see here[^]..

Now, at the log in time, store your user name/ user id in one Session object like Session["Username"] = UserNameTxt.Text;
It makes Session.Count > 0, so you can use following scenario at Searching Chart:

C#
if(Session.Count > 0)
{
    Response.Redirect("home.aspx");
}
else
{
    Response.Redirect("login.aspx");
}


Hope it will solve your issue.. :) If there is something that you don't get about this, let me know... :) :)
 
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