Say you have a webform with some fields and a button on it. When the user
clicks the button, the buttonclicked event gets fired on the server, it does
some processing, which includes creating some db records, and then redirects
the page. What is happening sometimes is that the server is a bit slow and
the page seems to sit there, so the user presses the button again, which
causes the server event to fire again, and so more records get created in
the DB. How can I stop the button firing an event once it has already done
so ?
Thanks
Adrian 2 1252
Hi Parker,
Try to add a javascript function onClick to the button and
1)Hide the button on click in javascript like
document.getElementById("Button1").style.visibilit y = "hidden";(PS: this
script works in IE.)
2)Show some friendly text in the place of the button like "Processing..." so
that the user will not panic
--
HTH
srini http://www.expertszone.com
"Adrian Parker" wrote: Say you have a webform with some fields and a button on it. When the user clicks the button, the buttonclicked event gets fired on the server, it does some processing, which includes creating some db records, and then redirects the page. What is happening sometimes is that the server is a bit slow and the page seems to sit there, so the user presses the button again, which causes the server event to fire again, and so more records get created in the DB. How can I stop the button firing an event once it has already done so ?
Thanks Adrian
Thanks srini, that works a treat!
"srini" <sr***@discussions.microsoft.com> wrote in message
news:90**********************************@microsof t.com... Hi Parker, Try to add a javascript function onClick to the button and 1)Hide the button on click in javascript like document.getElementById("Button1").style.visibilit y = "hidden";(PS: this script works in IE.) 2)Show some friendly text in the place of the button like "Processing..." so that the user will not panic -- HTH srini http://www.expertszone.com
"Adrian Parker" wrote:
Say you have a webform with some fields and a button on it. When the user clicks the button, the buttonclicked event gets fired on the server, it does some processing, which includes creating some db records, and then redirects the page. What is happening sometimes is that the server is a bit slow and the page seems to sit there, so the user presses the button again, which causes the server event to fire again, and so more records get created in the DB. How can I stop the button firing an event once it has already done so ?
Thanks Adrian This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Damon |
last post by:
I am working on a site in which I would like to have two dropdowns that will
allow a user to navigate through the administrative pages of the site. The
first would allow the user to choose the...
|
by: KV |
last post by:
I need to stop the user from getting the following message:
"The page cannot be refreshed without resending the information.
Click Retry to send the information again,
or click Cancel to return...
|
by: Diane Selby |
last post by:
Hi-
I am developing an ASP.NET application that can take a few seconds to
process the request from the user. We are looking for a client-side
solution that will prevent users from resubmitting...
|
by: Davids |
last post by:
in my small hangman web project I have a Hangman class which has some
methods and properties (int GuessAttempts, string GuessedLetters etc..)
which change as the game goes on... Best of all would...
|
by: Tina |
last post by:
I have an aspx page with a textbox and an "add to my Account Button." when
the button is pushed, my program adds the amount in the textbox to the
database which, lets say takes a few seconds. If...
|
by: Jamie |
last post by:
I am receiving an Invalid ViewState error after posting back to the same page
twice. Consistently the error occurs after the second postback and not after
the first.
I have looked into creating...
|
by: Mardy |
last post by:
I have an application where, in a few cases, I can hear more than one click
by the browser on a post back. I also see the IE progress bar appear twice
consecutively. This happens for example when I...
|
by: jediknight |
last post by:
Is it possible to programmatically stop multiple browsers from getting
the same session state?
The problem I have is that whenever I open a new browse using File-
I would like to stop this...
|
by: Nathan Sokalski |
last post by:
I have 2 private variables in my class that I need to remember the values of
between postbacks (or actually callbacks, since I am using AJAX). I want to
avoid using session variables, if possible....
|
by: Mike P |
last post by:
I have a form that I using to add details to an array, but I need to
continue to add these details to my array on multiple postbacks....how
can I do this? Do I need to use a Session object instead?...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
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,...
|
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...
| |