Click here to Skip to main content
11,490,973 members (71,002 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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 28-Dec-12 0:59am
Edited 28-Dec-12 1:21am
v3

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
0 Sergey Alexandrovich Kryukov 521
1 Andy Lanng 303
2 Sascha Lefèvre 240
3 Maciej Los 235
4 OriginalGriff 165
0 Sergey Alexandrovich Kryukov 9,829
1 OriginalGriff 8,520
2 Sascha Lefèvre 3,574
3 Maciej Los 3,151
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 28 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100