Click here to Skip to main content
15,879,095 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: too many error logs filling disk space Pin
led mike3-Apr-08 10:13
led mike3-Apr-08 10:13 
QuestionHow to do this? Pin
Chatura Dilan3-Apr-08 6:07
Chatura Dilan3-Apr-08 6:07 
AnswerRe: How to do this? Pin
pmarfleet3-Apr-08 9:17
pmarfleet3-Apr-08 9:17 
QuestionHow to avoid PostBack in LinkButton Pin
udaymohan3-Apr-08 5:47
udaymohan3-Apr-08 5:47 
GeneralRe: How to avoid PostBack in LinkButton Pin
Jesse Squire3-Apr-08 6:03
Jesse Squire3-Apr-08 6:03 
GeneralRe: How to avoid PostBack in LinkButton Pin
MoustafaS3-Apr-08 6:59
MoustafaS3-Apr-08 6:59 
QuestionHow can I find user click Back Button at IE? Pin
Dong Kim3-Apr-08 5:38
Dong Kim3-Apr-08 5:38 
AnswerRe: How can I find user click Back Button at IE? Pin
Jesse Squire3-Apr-08 6:27
Jesse Squire3-Apr-08 6:27 
You cannot directly detect the press of any browser button. You do have a couple of options for cleaning up, however.

First, in Global.asax, there is an event handler mapped for you called Session_End that will execute when the user's session expires. You could run your clean-up code there.

You could instead store your dataset objects in the Cache object of the current Http context. By doing so, you could set some cache policies that would be more aggressive in expiring the items. Note that this cache is shared accross user sessions, so you would want to use a key that is unique, such as Session.SessionId, to prevent sessions from interacting.

Another option is to use javascript to handle the onunload event for the body object. You could send an asynchronous request to a web service method on the server to perform your clean-up code for you. Note that the unload event will run whenever the page is unloaded from the browser, including when you perform a postback or navigate to another page in your site, so it can be difficult to determine when, exactly, you want to run your clean-up.

I hope that helps to get you started. Smile | :)

  --Jesse
"... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

QuestionHow to download embedded resources of webcontrol on AJAX call? Pin
pankazmittal3-Apr-08 3:47
pankazmittal3-Apr-08 3:47 
GeneralRe: How to download embedded resources of webcontrol on AJAX call? Pin
Jesse Squire3-Apr-08 3:52
Jesse Squire3-Apr-08 3:52 
General.asp pages with Asp.Net 2.0 Pin
Jacob Dixon3-Apr-08 3:39
Jacob Dixon3-Apr-08 3:39 
GeneralRe: .asp pages with Asp.Net 2.0 Pin
Jesse Squire3-Apr-08 3:50
Jesse Squire3-Apr-08 3:50 
GeneralRe: .asp pages with Asp.Net 2.0 Pin
Jacob Dixon3-Apr-08 4:07
Jacob Dixon3-Apr-08 4:07 
GeneralRe: .asp pages with Asp.Net 2.0 Pin
Jesse Squire3-Apr-08 4:12
Jesse Squire3-Apr-08 4:12 
GeneralRe: .asp pages with Asp.Net 2.0 Pin
Jacob Dixon3-Apr-08 6:41
Jacob Dixon3-Apr-08 6:41 
GeneralLosing Session in IIS Pin
Leandrão3-Apr-08 2:50
Leandrão3-Apr-08 2:50 
GeneralRe: Losing Session in IIS Pin
eyeseetee3-Apr-08 2:55
eyeseetee3-Apr-08 2:55 
GeneralRe: Losing Session in IIS Pin
N a v a n e e t h3-Apr-08 3:01
N a v a n e e t h3-Apr-08 3:01 
GeneralRe: Losing Session in IIS Pin
Leandrão3-Apr-08 7:24
Leandrão3-Apr-08 7:24 
GeneralRe: Losing Session in IIS Pin
Leandrão3-Apr-08 3:02
Leandrão3-Apr-08 3:02 
GeneralRe: Losing Session in IIS Pin
N a v a n e e t h3-Apr-08 3:03
N a v a n e e t h3-Apr-08 3:03 
GeneralRe: Losing Session in IIS Pin
eyeseetee3-Apr-08 3:08
eyeseetee3-Apr-08 3:08 
GeneralRe: Losing Session in IIS Pin
N a v a n e e t h3-Apr-08 3:09
N a v a n e e t h3-Apr-08 3:09 
GeneralRe: Losing Session in IIS Pin
Leandrão3-Apr-08 3:43
Leandrão3-Apr-08 3:43 
GeneralRe: Losing Session in IIS Pin
Leandrão3-Apr-08 3:13
Leandrão3-Apr-08 3:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.