473,388 Members | 1,526 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,388 software developers and data experts.

Is there any way to get click event of refresh button of browser?

Hi


Is there any way to get click event of refresh button of browser ?



thanks
Mar 25 '10 #1
4 3984
CroCrew
564 Expert 512MB
Hello sachin2320,

Not that I know of. But, I you could use the Page_Load event in a way that would work for you.

Expand|Select|Wrap|Line Numbers
  1.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  2.         If Not (IsPostBack) Then
  3.             'do something here
  4.         End If
  5.     End Sub
  6.  
Happy Coding,
CroCrew~
Mar 25 '10 #2
thanks for reply
I know it but problem is to get click event of refresh button of the browser

Im not sure it exist or not

thanks
Mar 29 '10 #3
CroCrew
564 Expert 512MB
Nope. Not that I know of. I don't think there will ever be one too.
Mar 29 '10 #4
Frinavale
9,735 Expert Mod 8TB
The only "click" events that your code can handle are any controls that exist in your page. The refresh button is not part of your page, it's part of the web browser. This means that there is no way to handle the click event for the refresh button in the browser.

You can detect when the page is being unloaded using JavaScript...you might actually find this interesting....check out the onbeforeuload JavaScript event to see if it can help you.

-Frinny
Mar 29 '10 #5

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

Similar topics

4
by: yfng | last post by:
In a web form, I want the user clicks on one button and this button will trigger another button/link which will open a new browser window? How to do that? Is there any method like...
2
by: Fabiano | last post by:
Hi there, Houston, i have a problem. :O) I have a page tha contains a datagrid and some textboxes. When the user clicks the ADD button, i need to insert the textbox data into a table and then...
3
by: Sameer | last post by:
I have a webpage that has a link button. This link button on click opens up a new page. This is what is happening: 1. Load the web page. 2. Click on the link. 3. Refresh the web-page. Result:...
3
by: Rosanne | last post by:
Is there a way to clear the SelectedIndex of a listbox when the browser's back button is clicked? I have a page that contains a server side list box with AutoPostBack = True. When the user...
1
by: TCORDON | last post by:
I have a web page that has a ImageButton that changes the value o a session variable. The problem is that when I click the refresh button in my browser somehow the click event for that button is...
21
by: Ben | last post by:
Hello I have frames set up in an asp.net application and need one frame to refresh another. Seeing as events need to be registered at the time the page is sent from the server, I was wondering...
1
by: karthik juneni | last post by:
Hi all, Iam trying to capture windows closing event (i.e) when the user clicks on the "X" button i want to capture that event and want to update some values in the database.I tried two methods...
1
by: Kuldeep | last post by:
Hello All, Visual Studio 2005 ASP.NET 2.0 C#.NET 2.0 I have an application which has a Button click event procedure as given below. protected void btn_Click(object sender, EventArgs e)
2
by: Max2006 | last post by:
Hi, I have a simple form with a button on it. After a button click postback, anytime user press F5 (browser page refresh), the button's OnClick event handler is called again without the button...
2
by: chrisp | last post by:
I have an ASP.NET 2 page with a button that causes a credit card transaction to be authorised. The authorisation procedure may take a few seconds and so I want to prevent the user from clicking the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.