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: The webpage gets refreshed and the link buttons onClick event
is fired.
However, if I just load the web-page and without clicking on the link
button, refresh the web-page it does not fire the onClick event of the
link button.
I don't want the link button's onClick event to fire when I refresh the
web-page. How can we prevent this from happening?
Thanks and Regards,
Sameer 3 10072
By clicking the link you are posting back the page. Once you've posted back
the page and the user hits refresh or F5 you're asking the browser to do
whatever it did last (which is a post). To fix this, have your LinkButton's
OnClick do a Response.Redire ct(Request.Path ).
-Brock
DevelopMentor http://staff.develop.com/ballen 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: The webpage gets refreshed and the link buttons onClick event is fired. However, if I just load the web-page and without clicking on the link button, refresh the web-page it does not fire the onClick event of the link button.
I don't want the link button's onClick event to fire when I refresh the web-page. How can we prevent this from happening?
Thanks and Regards, Sameer
The link button's onClick event does a window.open (Javascript) and
writes it to the response object. If I do a Response.Redire ct, the
window.open action is lost.
Seems like I need some other way of doing the window.open and not using
the Response.Write to write the window.open javascript to it. Not
really sure how to do it...
Thanks,
Sameer
Brock Allen wrote: By clicking the link you are posting back the page. Once you've posted back the page and the user hits refresh or F5 you're asking the browser to do whatever it did last (which is a post). To fix this, have your LinkButton's OnClick do a Response.Redire ct(Request.Path ).
-Brock DevelopMentor http://staff.develop.com/ballen 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: The webpage gets refreshed and the link buttons onClick event is fired. However, if I just load the web-page and without clicking on the link button, refresh the web-page it does not fire the onClick event of the link button.
I don't want the link button's onClick event to fire when I refresh the web-page. How can we prevent this from happening?
Thanks and Regards, Sameer
Just changed the link button to hyperlink and it works fine now.
Thanks,
Sameer
Sameer wrote: The link button's onClick event does a window.open (Javascript) and writes it to the response object. If I do a Response.Redire ct, the window.open action is lost.
Seems like I need some other way of doing the window.open and not using the Response.Write to write the window.open javascript to it. Not really sure how to do it...
Thanks, Sameer Brock Allen wrote: By clicking the link you are posting back the page. Once you've posted back the page and the user hits refresh or F5 you're asking the browser to do whatever it did last (which is a post). To fix this, have your LinkButton's OnClick do a Response.Redire ct(Request.Path ).
-Brock DevelopMentor http://staff.develop.com/ballen 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: The webpage gets refreshed and the link buttons onClick event is fired. However, if I just load the web-page and without clicking on the link button, refresh the web-page it does not fire the onClick event of the link button.
I don't want the link button's onClick event to fire when I refresh the web-page. How can we prevent this from happening?
Thanks and Regards, Sameer This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Assaf Weinberg |
last post by:
Using ASP.NET web form with VB.NET
I have a page with a calendar control that
onSelectionChanged builds a table control showing the
events scheduled for the selected calendar days. One of
the columns in this table contains linkbuttons that, when
clicked, should execute some code (currently an event
handler called showEvent) that displays details.
I am currently using addhandler to specify the handler for
|
by: Scott |
last post by:
I have a clickable graph that resides on page 1. If user clicks a data point
on the graph, the page runs again yeilding a 2nd graph that shows a more
detailed graph.
Problem is, I have a recordset table on the 2nd graph page and because the
user gets to it by clicking the graph, the page doesn't properly post to
render the recordset table. I can click "Refresh" on 2nd page and table
displays fine.
Is there an ASP refresh command that...
|
by: Willem |
last post by:
Can someone tell me how I can get a page(any page) on the Internet to
refresh automatically every 5 minutes. I was thinking along the lines of
having a HTML file on my C-drive with JavaScript to do so. It should be
possible, Right?
I don't know much about JavaScript.
Thanks for the help.
|
by: David |
last post by:
Hello.
I have such problem:
I have ImageButton on my form which is attached to some image like
"image.jpg", now when I change image file (physically file) with some other
file with the same name my page shows the old image until I click "Refresh"
button of the browser.
So how can I refresh web form from code?
Or may be there is some other way to solve this problem?
|
by: TS |
last post by:
Im in a web page and call an asynchronous method in business class. the call
back method is in the web page.
When page processes, it runs thru code begins invoking the method then the
page unloads. When the callback method is raised, only the method in the web
page is run and the page never refreshes, it seems it all happens on the
server side.
I am trying to refresh the constrols on the page inside the callback method,
but when id...
| |
by: achoo |
last post by:
Is it possible to extend a Web service proxy so that it understands an HTTP
refresh page?
Explanation:
* The Web service proxy was autogenerated by Visual Studio .NET 2003
from the Web service's WSDL. It inherits from
System.Web.Services.Protocols.SoapHttpClientProtocol.
* The Web service is hiding behind a load-balancing content switch
|
by: phforum |
last post by:
Hi,
I wrote a PHP page for user input the information to search the
database. And the database data will update every second. I want to
set the auto refresh to get the data from database every minute. But
the page always display the dialog box ask me to resend the
information. How to disable this warning message. I using POST and
REQUEST to get the data from user input page.
Thanks all
|
by: =?Utf-8?B?YzY3NjIyOA==?= |
last post by:
Hi all,
Recently, I just found out that our program behaves differently from before.
in our asp, in order to prevent data disppearing problem in form fields,we
use session variable to display the field values if a customer click "back"
button on the page2.asp in the browser,(the session variables
Session(aQuoteName(iPerson)&"TripCost") is set up in the page2.asp) i.e.
then in the page1.asp, we use:
<input name="<%=aQuoteName(iPerson)&...
|
by: tvnaidu |
last post by:
How to auto refresh page for every 3 minutes by passing command part of URL?. I need to refresh one page automatically by passing that refresh command part of url, for example if I want to refresh my-own-web-page.com: some URL like this to auto reload?
http://www.my-own-web-page.com?auto-refresh=3
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |