is it expected behavior (in 1.1) for a disabled=true textbox to *not*
maintain its value upon postback?
if so, this is disappointing. often times in my app i need to "lock"
textboxes, reserving them for automated javascript entry only, not
manual. but id still like to pick up their values on postback.
i have work arounds i can employ, but i wanted to confirm this
behavior.
thanks,
mattIs it something that the user is supposed to see? Or not.
Usually if i have values i want to hide from the user, i will use the
following:
<input type=""hidden" id="hdnMyValue" runat="server" >
(in 2.0 there is actually an asp Hidden control type)
If you do want the user to see the box, then instead of disabling it, you
could set it to be ReadOnly.
How are you coding your textbox? Are your using
<asp:textbox id=txtMyBox runat=server enabled=false />
or are you using
<input type=textbox disabled=true />
<matt@.mailinator.comwrote in message
news:1154015702.359356.263670@.h48g2000cwc.googlegr oups.com...
Quote:
Originally Posted by
hello,
>
is it expected behavior (in 1.1) for a disabled=true textbox to *not*
maintain its value upon postback?
>
if so, this is disappointing. often times in my app i need to "lock"
textboxes, reserving them for automated javascript entry only, not
manual. but id still like to pick up their values on postback.
>
i have work arounds i can employ, but i wanted to confirm this
behavior.
>
>
thanks,
matt
>
I'd concur that
ReadOnly on the textbox
and/or a
<asp:hidden>
are the 2 options for handling this.
<matt@.mailinator.comwrote in message
news:1154015702.359356.263670@.h48g2000cwc.googlegr oups.com...
Quote:
Originally Posted by
hello,
>
is it expected behavior (in 1.1) for a disabled=true textbox to *not*
maintain its value upon postback?
>
if so, this is disappointing. often times in my app i need to "lock"
textboxes, reserving them for automated javascript entry only, not
manual. but id still like to pick up their values on postback.
>
i have work arounds i can employ, but i wanted to confirm this
behavior.
>
>
thanks,
matt
>
Yes, this is a browser side behavior (AFAIK likely accross most browsers).
The (bad ?) idea is likely that if the control is disabled you can't change
the value and consequently there is no need to post this (unchanged) value
to the server (probably designed this way back to low bandwidth/ no
javascript days)...
--
Patrice
<matt@.mailinator.coma crit dans le message de news:
1154015702.359356.263670@.h48g2000cwc.googlegroups. com...
Quote:
Originally Posted by
hello,
>
is it expected behavior (in 1.1) for a disabled=true textbox to *not*
maintain its value upon postback?
>
if so, this is disappointing. often times in my app i need to "lock"
textboxes, reserving them for automated javascript entry only, not
manual. but id still like to pick up their values on postback.
>
i have work arounds i can employ, but i wanted to confirm this
behavior.
>
>
thanks,
matt
>
Patrice wrote:
Quote:
Originally Posted by
Yes, this is a browser side behavior (AFAIK likely accross most browsers).
The (bad ?) idea is likely that if the control is disabled you can't change
the value and consequently there is no need to post this (unchanged) value
to the server (probably designed this way back to low bandwidth/ no
javascript days)...
ah, this is what i was looking for. as i mentioned i have work arounds,
but i wanted to make sure this was unchangeable behavior.
thanks,
matt
0 comments:
Post a Comment