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

Disable Button once clicked

parshupooja
159 100+
Hey all,

I have button on page. OnClick event I am saving records to database, which takes couple of seconds, meanwhile if user becomes impatient and clicks again, it triggers save again. I want to disable button once clicked and save records too. I tried using javascript on OnClientClick to disable button, but unable to acheive both things together,it either save records or disable button.

Expand|Select|Wrap|Line Numbers
  1. <asp:Button ID="btnSave" runat="server"   Text="Save/Continue" OnClick="btnSave_Click" onClientClick="history.go(0)" >
plz help
Jan 18 '08 #1
3 2517
priyamv
17
if u r using .net framework then
button_id.visible=false or
button_id.enabled=false
Jan 19 '08 #2
parshupooja
159 100+
I cant use that becuase I want enabled once the data is saved. i want to disable as soon I click button and once the all the code executed with in save button I want button to be enabled.


thanks anyway

if u r using .net framework then
button_id.visible=false or
button_id.enabled=false
Jan 24 '08 #3
kunal pawar
297 100+
Hi,
try this

update
onClientClick = "this.disabled=true"

and

on server click
btnSave.Enabled = true
Jan 24 '08 #4

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

Similar topics

21
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" ...
4
by: KS | last post by:
Im trying to prevent the user from clicking any other links on my page when the user have selected/clicked a href once. Sometimes it takes a while before the next page loads so some user will try...
14
by: Sinity | last post by:
Anyone knows the method/codes to disable the clicked button after first click by using .aspx-- to prevent people to click many time when waiting for the server response. I tried to do this by...
6
by: GD | last post by:
Hi, I wonder how to disable the "submit" behavior of a button. What I want is to assign values to dynamically added user controls without page postback. Problem: dynamically created control can...
1
by: microsoft | last post by:
I am looking for code for a button on a website, and I want it to prevent users from clicking more than once while their request is being processed. I would like it to disable or hide the button...
3
by: Jeff | last post by:
I have a payment form with a submit button. A large percentage of users double-click the submit button thus submitting their payment information twice. I would like to use javascript to disable...
16
by: Barry Gilmore | last post by:
Is there a way to disable a button after it is clicked? I am trying to avoid having someone click on it twice while they wait for it to process. Thank you!
0
by: Ahmad Jalil Qarshi | last post by:
Hi! I have a problem while developing some webpages.The Problem is that:- How We Can Disable The Controls Of One Web Form From Other Web Form In Asp.net? Explanation:- There Should Be Two...
5
by: zlf | last post by:
How to disable button once it is clicked on the page? The codes in click event of submit button is time-costing(about 4-5 secs), in this period, user maybe do a re-submit, that is not expected. ...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
Oralloy
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,...

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.