Click here to Skip to main content
Sign Up to vote bad
good
See more: ASP.NET
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 27 Dec '12 - 23:59
Edited 28 Dec '12 - 0:21


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:
 
if(Session.Count > 0)
{
    Response.Redirect("home.aspx");
}
else
{
    Response.Redirect("login.aspx");
}
 
Hope it will solve your issue.. Smile | :) If there is something that you don't get about this, let me know... Smile | :) Smile | :)
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 294
1 OriginalGriff 195
2 CPallini 163
3 Mahesh Bailwal 159
4 Tadit Dash 148
0 Sergey Alexandrovich Kryukov 10,169
1 OriginalGriff 7,749
2 CPallini 4,181
3 Rohan Leuva 3,482
4 Maciej Los 3,089


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 28 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid