473,480 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Create 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 1276
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*******@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.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*******@discussions.microsoft.com> wrote in messag
news:E3**********************************@microsof t.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
2830
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...
6
2541
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...
3
1598
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...
2
1367
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,...
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...
12
2230
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...
2
2427
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...
3
3795
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...
2
1532
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)...
0
7045
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
7087
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...
0
5341
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,...
1
4782
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...
0
4483
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...
0
2995
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...
0
2985
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
182
bsmnconsultancy
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...

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.