I have a asp.net form where if the user checks a check box I need to disable
some of the fields. I don't need to make a trip to the server for anything
at this point so is this is a case of using javascript to disable the fields
or should I be using Ajax do that? As probably can be seen from my post I
have never used Ajax yet.
Bill
Eliyahu Goldin - 30 Jul 2007 15:07 GMT
Bill,
You may consider Ajax only if you need to immediately react to the checks.
Since you don't, all you need to do is to make sure that the checkbox's
AutoPostBack property is not set to true and your server-side app will pick
up the values on the next postback.

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
>I have a asp.net form where if the user checks a check box I need to
>disable some of the fields. I don't need to make a trip to the server for
[quoted text clipped - 3 lines]
>
> Bill
Bill Gower - 30 Jul 2007 15:20 GMT
So you are saying to just use Javascript to disable the controls that need
to be?
Bill
> Bill,
>
[quoted text clipped - 10 lines]
>>
>> Bill
Eliyahu Goldin - 30 Jul 2007 15:22 GMT
What do you want to disable the controls for?

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
> So you are saying to just use Javascript to disable the controls that need
> to be?
[quoted text clipped - 15 lines]
>>>
>>> Bill
Bill Gower - 30 Jul 2007 15:54 GMT
Because they are not applicable if the checkbox is checked.
Bill
> What do you want to disable the controls for?
>
[quoted text clipped - 17 lines]
>>>>
>>>> Bill
Eliyahu Goldin - 30 Jul 2007 16:16 GMT
Then yes, your best option is client-side disabling with javascript.

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
> Because they are not applicable if the checkbox is checked.
>
[quoted text clipped - 21 lines]
>>>>>
>>>>> Bill
chenhong - 30 Jul 2007 15:52 GMT
as you mentioned you dont need to make a trip to the server to disable some
fields.so dont.
here partial update will make no sense.
"Bill Gower" <billgower@charter.net> дÈëÏûÏ¢ÐÂÎÅ:OIFxOIr0HHA.3916@TK2MSFTNGP02.phx.gbl...
>I have a asp.net form where if the user checks a check box I need to
>disable some of the fields. I don't need to make a trip to the server for
[quoted text clipped - 3 lines]
>
> Bill
Steve C. Orr [MCSD, MVP, CSM, ASP Insider] - 30 Jul 2007 22:15 GMT
I'd suggest using JavaScript in this case.
No need for AJAX here.

Signature
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
>I have a asp.net form where if the user checks a check box I need to
>disable some of the fields. I don't need to make a trip to the server for
[quoted text clipped - 3 lines]
>
> Bill