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

Disable asp.net button

I'm using a asp.net button for postback purposes.
Since the postback might take some time i would also like to disable this
button.
On reload the button will be enabled again.. fine..

However, i used onclientclick and then the submit is aborted.
So i messed with some ordinary button stuff executing a click() on the
asp.net button.
Isn't there an easier way to disable this asp.net button and still have the
execute?
Dec 12 '06 #1
2 1818
"Edwin Knoppert" <ne**@hellobasic.comwrote in message
news:45***********************@text.nova.planet.nl ...
Isn't there an easier way to disable this asp.net button and still have
the execute?
http://www.google.co.uk/search?sourc...+twice+prevent
Dec 12 '06 #2
This also works (good enough for me)

<asp:Button ID="Button1" runat="server" Text="Button"
OnClientClick="setTimeout( 'document.getElementById( \x22' + this.id +
'\x22 ).disabled = true;', 1 );"/>


"Mark Rae" <ma**@markNOSPAMrae.comschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
"Edwin Knoppert" <ne**@hellobasic.comwrote in message
news:45***********************@text.nova.planet.nl ...
>Isn't there an easier way to disable this asp.net button and still have
the execute?

http://www.google.co.uk/search?sourc...+twice+prevent

Dec 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled...
2
by: techfuzz | last post by:
I scoured this group and others looking for the best way to disable a button after the first click to prevent multiple submissions, but never did find anything that worked like they said it would. ...
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: Al Cohen | last post by:
I'm using a LinkButton to call some code, then do a redirect. The code does some queries, sends some emails, and takes a few moments before the redirect is performed. I'd like to disable my...
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...
0
by: Robert Ladd | last post by:
Hi, I'm trying to disable the asp.net calendar control from a javascript function, but it doesn't disable the doPostBack. To simplify the situation, assume a page with 4 controls. A...
4
by: Patrick Flaherty | last post by:
Hi, Experienced programmer but new to PHP. Moreover I'm to use PHP with Xoops on top (this adds object orientation?). I don't seem to find a xoops Usenet group? Whatever the case (and...
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...
8
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? -----------------------------------------------------------------------...
1
by: eeriehunk | last post by:
Hi All, I wrote a procedure to clear all my text fields and disable all buttons in my form. And I call this procedure in a button (insert button). when I presses the insert button, after all my...
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
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...
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
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,...
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.