.net - How To Know User Has Left Website Or Close Browser Window Immediately In Server Side
Sep 10, 2010
In ASP.NET, Session_End will be fired when the Session is time out then I can guess the user has left or close the Browser window in this method. But there is some delay till time out, is there any better solution?
i need to develop a tool which will take a long of time while processing, lets say copying data with size 1 GB from one database to another,
i can develope a webform for that issue but i have a problem which is when the user close the browser the process will terminate!
what i need is when the user click on "copy" button (regarding to my previous scenario) the process continue even the user close the browser, and will not end untill the all data copied successfully to the destination place.
should i use windows service with my webform? or webservice ?
I open a popup window by client code. Now I want to do some calculation on this popup window & if it success then I want to save the calculation result in a session variable and close the window. I mean I want to click a button on popup window, it will do some calculation on server side and if it success the it will store the calculation result in a session variable and close the popup window.
I have three websites A, B & C. Website A & B opens in new tab when a link is clicked from website C. I want to close all the tabs when logout button is clicked in website C.
I inherited a poorly designed ASP.Net web site. Here are some of the main parts;
1. Default.aspx. This web page conatins several user controls that do the bulk of the work. 2. Alerts.ascx. Used by Default.aspx 3. Dashboard.ascx. Used by Default.aspx. 4. LabResults.aspx. Popup window called from Alerts.ascx
bear with me while I describe the scenario:
1. The user clicks a button on default.aspx and a page in Alerts.ascx is displayed. This works fine.
2. The user then clicks a hyperlink control on Alerts.ascx and the popup window LabResults.aspx displays. This also works fine.
3. The user clicks a button on the popup window. Here is where I am having problems. I want to close the popup window and do a post back but not to Alerts.ascx. i want to instead call dashboard.ascx and run a particular event which displays some patient info. I do not know how to pass control to the dashboard.ascx user control at his point. Presently, my popup window closes which is good but the Alerts.ascx page is still displayed. I want to close this page and open the dashboard.ascx instead.
If the logged in user either exits out of a directory OR closes the browser......I want to automatically log them out. IS this possible and where is it done? What code can be used for these actions?
I have been reading up on a few atricles, and am now vey confused on which is the best option and how to go about it.
I have an aspx page that has a gridview with x amount of records. Each record has a checkbox to selet that record for processing. When a user clicks a button it runs some vb.code behind which generates a file for all the records selected in the gridview. This works fine, however, I also want to display a report at the end.I created a rdlc report ("ItemListing") which I can display in a reportviewer. What I want to do is show this report as a popup / new window infront of he current aspx page , to allow the user to print or save . I also want the user to be able t close this window.
I created timecard for a website and I would like to automatically clock out the user everytime when user logout or close the website. Is there a control for that? And if yes, where do i have to put he code at?? I think it should be in the code behind of master page... and on the Page_Load function
Im calling the new popup window from gridview like
[Code]....
In the AddTargetPopUP.aspx ,I have button Call "ADD".When i click the add button it'll insert datas into database.I want to reload the parent gridview after insert into the database and want to close the popup.
My requirement is that I have a few hyperlinks on a webpage and when the user clicks on these hyperlinks I should redirect the user to an asp.net web page(Default.aspx) in a different website.
For the 1st time when the user clicks on one of the hyperlinks it will launch a new browser window with the Default.aspx loaded and then if the user clicks on some other hyperlink I want to redirect the user to the existing browser window(in which deafult.aspx is already loaded)with the content related to this particular hyperlink loaded,instead of launching a new browser window/tab.
But I am not sure of how to achieve this.I wonder if I can add some js to the asp.net Default.aspx page to achieve this.
I have website which runs multiple threads. When user close the browser but threads are still running. How to kill/stop all thread in asp.net on browser close.
I have a login page that is loaded in popup window (colorbox) and after user logs in it should be closed and parent window should be loaded with new page.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Do While reader.Read() If Trim(reader("ZAP").ToString()) = Trim(textBoxZap.Text) Then Session("A") = "1" Response.Redirect("~/default.aspx") Else lblErr.Text = "incorect" End If Loop
So once the buton is clicked and user name and password is corect popup window should be closed and user redirected to default aspx.
Refresh the Parent Window. I open the child window,I want that on close button click on child window,parent window refreshes
Code:
[code]....
I searched all on the net & find the above soln,But its not refreshing.when i click on button1,then some Pop up appears see in Pic(with buttons Retry & Cancel). When i click on Retry again the child window loads Then again i click on button1,again popup appears & so on & on.
I have created an intranet application in ASP. From my main web page I am opening a web browser window and adding a record to database from that new window. Now on close of that window I want to refresh my main web page to reflect the database changes. My backend is "ms access" Also on the other hand I also want to disable the closing button of web browser.
i am developing a chat engin and i need some guidenc i have done to some exten but i am unable to make the window pop up on both the users i.e if a want to chat to b if he clicks on b the window is poping up in a's side but it's not poping up on the b's side
What is the best way to show the server-side generated HTML (full page) into a new popup window? It should be triggered upon clicking a button (causing a postback to the server).
Edited:
The HTML content are dynamically generated in the code behind and the content is full page (<html> ... </html>). Upon clicking a button on the web page, I would like to get the generated html content and pass it to the browser and show it in a new popup window. The content will be the final result (UI) not HTML tags.