sessions

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2009
Posts: 24
Reputation: k.vijayakumar has a little shameless behaviour in the past 
Solved Threads: 0
k.vijayakumar k.vijayakumar is offline Offline
Newbie Poster

sessions

 
0
  #1
Aug 26th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 177
Reputation: Kusno is an unknown quantity at this point 
Solved Threads: 14
Kusno's Avatar
Kusno Kusno is offline Offline
Junior Poster

Re: sessions

 
0
  #2
Aug 27th, 2009
Originally Posted by k.vijayakumar View 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
how if like this :

  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
NEVER NEVER NEVER GIVE UP
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 164
Reputation: dnanetwork has a little shameless behaviour in the past 
Solved Threads: 24
dnanetwork's Avatar
dnanetwork dnanetwork is offline Offline
Junior Poster

Re: sessions

 
0
  #3
Aug 27th, 2009
  1. session.abandon();
  2. session.clear();
  3. Response.Redirect("Login.aspx");
Mark the thread as resolved if your problem gets resolved :)
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 24
Reputation: k.vijayakumar has a little shameless behaviour in the past 
Solved Threads: 0
k.vijayakumar k.vijayakumar is offline Offline
Newbie Poster

Re: sessions

 
0
  #4
Aug 27th, 2009
Originally Posted by Kusno View Post
how if like this :

  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
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 205
Reputation: carobee is an unknown quantity at this point 
Solved Threads: 11
carobee carobee is offline Offline
Posting Whiz in Training

Re: sessions

 
0
  #5
Aug 27th, 2009
mark the thread as solved if you have received your answer
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC