473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

killing session

i want to kill a session on page load & then redirect it to another page.
Dec 11 '07 #1
12 1305
Plater
7,872 Expert 4TB
Expand|Select|Wrap|Line Numbers
  1. Session.Abandon();
  2. Response.Redirect("somepage.aspx");
  3.  
Dec 11 '07 #2
Expand|Select|Wrap|Line Numbers
  1. Session.Abandon();
  2. Response.Redirect("somepage.aspx");
  3.  
in which event i have to write this.....
Dec 11 '07 #3
in which event i have to write this.....
i write that code on page load .
it can redirect to the another page i want that after 2 min it can be redirect to another page.
reply me soon.
Dec 11 '07 #4
in grid view how can we valdate that no value is repeated.........plz tell me.
Dec 11 '07 #5
i want to kill session on page load ........
i write that code on page load .

Session.Abandon();
Response.Redirect("somepage.aspx");

it can redirect to the another page i want that after 2 min it can be redirect to another page.
reply me soon.
Dec 11 '07 #6
i write that code on page load .
it can redirect to the another page i want that after 2 min it can be redirect to another page.
reply me soon.
plz reply me soon on which event i have to write.
Dec 11 '07 #7
Plater
7,872 Expert 4TB
i write that code on page load .
it can redirect to the another page i want that after 2 min it can be redirect to another page.
reply me soon.
Sessions automatically timeout after a set amount of time (it's default is 20minutes, you can change it in the settings of IIS, and probably in the web.config file)
Dec 11 '07 #8
Plater
7,872 Expert 4TB
i want to kill session on page load ........
i write that code on page load .

Session.Abandon();
Response.Redirect("somepage.aspx");

it can redirect to the another page i want that after 2 min it can be redirect to another page.
reply me soon.
Please don't double post. I have merged the threads.
Dec 11 '07 #9
plz tell me how to kill a session on page load..
i have written that code-
session.abandon( );
response.redirect("page.aspx");
but it cant work.

i want that session should expire on pageload after some time then it can be redirect to login page.
Dec 12 '07 #10
towers
3
Have you tried Session.RemoveAll() ?
Dec 12 '07 #11
Plater
7,872 Expert 4TB
I have once AGAIN merged your double(now triple post). DO NOT KEEP DOING THAT.
Your question is already being worked on, there is no reason to spam the forum.


Now then, you keep saying it "doesn't work", what do you mean by that? Session.Abandon() will drop the current session values and any new page request by that user will attempt to create a new session.
It does NOT force cached pages to expire on the client side, so they can still use forward and back buttons, UNLESS you have set the pages to NOT be cached and are validating their Session contents at page_load().

So again, what do you mean by "not working"? What have you tried so far? Please try and explain your problem better.
Dec 12 '07 #12
hello plz tell me how can i refresh grid ..plz reply me along with coding
Dec 26 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Colin Steadman | last post by:
I have created a function to kill all session variables that aren't in a safe list. This is the function - Sub PurgeSessionVariables For Each Item In Session.Contents Select Case Trim(Item)...
2
by: MLH | last post by:
On the subject of switching between virtual consoles to get out of a 'hung' situation in the primary console... What I have been doing is pressing LEFTALT-F4 to bring up a 2nd virtual console,...
1
by: krose | last post by:
Hi Using a couple of examples on CodeProject.com I've create a nice little shell extension (adds some custom menus for proprietary file types). Everything is working fine, except I can't get it...
14
by: Rob Meade | last post by:
Hi all, Having created a secure login, and then create session variables to detect wether or not a user is logged in - I would now like to be able to off a log out page! :) I have found the...
2
by: news.microsoft.com | last post by:
I am having a difficult time with cookies. In my code, I need to allow a user to login to my admin site. I figure I can set a cookie, then authenticate them, and all should be well. This works,...
3
by: Raghu Raman | last post by:
Hi, am in c#.net project. am using the session object for some logic. e-g:session="Add"; i can refer this by using if(Session=="Add") { logic
2
by: Vitaly Belman | last post by:
Is there a way to kill a session in PostrgeSQL? I ran a bad query by mistake and I don't want to shut the whole database just to quit using the whole CPU. -- ICQ: 1912453 AIM: VitalyB1984...
1
by: Yong Feei Shun | last post by:
Dear all, I am having a question here. hope you guys could help. Whenever i kill a user, i cant kill the oracle statement there, eventhough the user had been killed. What should be the problem?...
3
by: eeriehunk | last post by:
Hi All, I am a little confused between a session and a process. I learnt that an Oracle Session is created for every login. And we can run many processes in one session. I have also learnt how to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.