943,568 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 417
  • ASP.NET RSS
Aug 26th, 2009
0

sessions

Expand Post »
hi, when session expires i want to give message and send them to my login page.for this where i have to write the code.


thank you
Similar Threads
Reputation Points: 4
Solved Threads: 0
Newbie Poster
k.vijayakumar is offline Offline
24 posts
since Aug 2009
Aug 27th, 2009
0

Re: sessions

hi, when session expires i want to give message and send them to my login page.for this where i have to write the code.


thank you
how if like this :

ASP.NET Syntax (Toggle Plain Text)
  1. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  2. If session("UserID").ToString.Trim = "" Then
  3. Response.Redirect("Login.aspx")
  4. Exit Sub
  5. End If
  6. End Sub
Reputation Points: 11
Solved Threads: 17
Junior Poster
Kusno is offline Offline
191 posts
since Aug 2007
Aug 27th, 2009
0

Re: sessions

ASP.NET Syntax (Toggle Plain Text)
  1. session.abandon();
  2. session.clear();
  3. Response.Redirect("Login.aspx");
Reputation Points: 28
Solved Threads: 106
Banned
dnanetwork is offline Offline
633 posts
since May 2008
Aug 27th, 2009
0

Re: sessions

Click to Expand / Collapse  Quote originally posted by Kusno ...
how if like this :

ASP.NET Syntax (Toggle Plain Text)
  1. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  2. If session("UserID").ToString.Trim = "" Then
  3. Response.Redirect("Login.aspx")
  4. Exit Sub
  5. End If
  6. End Sub
thank you,it is fine.i used it
thank you
Reputation Points: 4
Solved Threads: 0
Newbie Poster
k.vijayakumar is offline Offline
24 posts
since Aug 2009
Aug 27th, 2009
0

Re: sessions

mark the thread as solved if you have received your answer
Reputation Points: 10
Solved Threads: 12
Posting Whiz in Training
carobee is offline Offline
209 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Object expected Menu error
Next Thread in ASP.NET Forum Timeline: UpdatePanel, Radiobutton





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC