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

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 1270
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
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
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
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
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
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
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
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
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
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.