473,804 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disabling objects on a web page

Jo
Hi

I've got a .NET web application and once a user presses a certain button the the page I'd like to disable other buttons straight away so that the user can't press anything else while calculations are performed. I realise that if I put code to disable other buttons at the start of my button press procedure then it doesn't actually happen until the page refreshes, which is after the calculations are performed. Is there anyway to get around this

Thanks for your help

Jo
Jul 21 '05 #1
3 1303
You can write simple client side scripts to disable the controls. If you try
to disable the controls in your server side code (your code behind), it will
get executed on the server when the postback occurs and will be reflected in
the browser when the page is refreshed with new data. What you need is to
write client side script for your web controls/server side controls.

James

"Jo" <an*******@disc ussions.microso ft.com> wrote in message
news:E3******** *************** ***********@mic rosoft.com...
Hi,

I've got a .NET web application and once a user presses a certain button the the page I'd like to disable other buttons straight away so that the
user can't press anything else while calculations are performed. I realise
that if I put code to disable other buttons at the start of my button press
procedure then it doesn't actually happen until the page refreshes, which is
after the calculations are performed. Is there anyway to get around this?
Thanks for your help,

Jo

Jul 21 '05 #2
Jo
ok, but i need the buttons to be re-enabled once the server side code finishes executing - how can I incorporate that into client side code on a single button click

----- James P wrote: ----

You can write simple client side scripts to disable the controls. If you tr
to disable the controls in your server side code (your code behind), it wil
get executed on the server when the postback occurs and will be reflected i
the browser when the page is refreshed with new data. What you need is t
write client side script for your web controls/server side controls

Jame

"Jo" <an*******@disc ussions.microso ft.com> wrote in messag
news:E3******** *************** ***********@mic rosoft.com..
Hi
I've got a .NET web application and once a user presses a certain butto the the page I'd like to disable other buttons straight away so that th
user can't press anything else while calculations are performed. I realis
that if I put code to disable other buttons at the start of my button pres
procedure then it doesn't actually happen until the page refreshes, which i
after the calculations are performed. Is there anyway to get around this Thanks for your help
J


Jul 21 '05 #3
JG
No, you don't need to re-enable the buttons. When the page is refereshed with new data, those controls will become enable again, unless you disable them in your code behind.
Jul 21 '05 #4

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

Similar topics

3
2871
by: Russell McDade | last post by:
I have a html page that I don't want anyone to print. Is there a way using JavaScript to send an alert to the user to warn them from trying to print the html page? Is there an onPrint event handler? In my book 'JavaScript a Beginner's Guide' by John Pollock none is listed. Can a function be written that will execute if someone tries to print the html? Thanks in advance P.S. I also have a printable version of the page in pdf which is for...
6
2556
by: sonic | last post by:
Hi, I am experimenting with different viewstate management ideas for large datagrids, and found a microsoft suggestion to turn it off, and only store relevant information by manually accessing viewstate. as per some helpful suggestins in MSDN "Common DataGrid Mistakes" http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-commondatagridmistakes.asp they suggest disabling datagrid viewstate and adding...
3
1618
by: PB | last post by:
What is the rationalle for disabling JavaScript. AFAIK, the primary reason is for "security purposes" - but what specific kind of threats does the protect against? AND - is the disabling of JavaScript something that is done very much? I know it's impossible to answer that last question definitively - so I'm wondering if it has presented any of you with any real problems in the day-to-day running of your Web applications (i.e. support...
2
1392
by: adeelanjum2001 | last post by:
i am using radiolist box control in my page. when i disable radiolist box when page is displayed first time, that is not ispostback, and when i try to enable it with my javascript code afterwards, it is never enabled. i have searched dozens of site looking for this problem. is there any way around of this problem. thanks in advanced
2
240
by: Jo | last post by:
Hi I've got a .NET web application and once a user presses a certain button the the page I'd like to disable other buttons straight away so that the user can't press anything else while calculations are performed. I realise that if I put code to disable other buttons at the start of my button press procedure then it doesn't actually happen until the page refreshes, which is after the calculations are performed. Is there anyway to get around...
12
2277
by: Nalaka | last post by:
Hi, I suddenly started getting a lot of errors from html validation (some CSS) so I followed the following instructions to disable it. If you'd rather not have these types of HTML validation errors show up in your error-list, you can disable this functionality by selecting the Tools->Options menu item in VS or Visual Web Developer. Select the TextEditor->Html->Validation tree option in the left-hand side of the
2
2444
by: dm1608 | last post by:
I have to issues: 1) Does anyone know of a programmatic way I can disable all textboxes, combo, listboxes, and buttons on a form? 2) What is the best practice for disabling multiple controls on a form. Basically, I need to disable almost everything on a form and re-enable when a particular task is complete. It seems like I duplicate the code over and over in the code... then later when I add a new control, I invariably miss...
3
3810
by: ChrisN | last post by:
Invoking a postback before a large ASP.NET page has fully rendered will often cause the page to crash. This is unhelpful and confusing to users. I'm wondering if I can overcome this by disabling any controls that invoke a postback until the page is fully rendered, ie setting the controls disabled server-side, serving the page and then having a JavaScript routine right at the bottom of the page re-enable them client-side.
2
1552
Frinavale
by: Frinavale | last post by:
I've run into a bit of a problem concerning JavaScript and ASP.NET. Upon page submission I disable all of my buttons and would also like to disable all of my inputs (Textboxes, DropDownLists, etc) as well. This will prevent multiple postbacks to the server while it's processing and keep the user from making changes during this time. The problem is that when I use JavaScript to disable the input controls the values of these objects come...
0
10595
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, 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...
0
10343
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 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...
1
10335
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,...
0
10088
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9169
agi2029
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...
1
7633
isladogs
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...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5529
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...
0
5668
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.