After setting the web control text box enable property to FALSE makes the
control to loose the data between round trip. I am making sure that the
property - EnableViewState = TRUE.
Same code when the text box Enable property set to TRUE retains the value.
Please advice.
-GillHi,
this is related to the HTML standard. Setting Enabled to False on form
control renders it as disabled HTML element (in case of TextBox, <input
type="text" disabled="disabled"...> ). And disabled element's value is not
posted with the form. Take a look at:
http://www.w3.org/TR/REC-html40/int...html#h-17.12.1
By the way, having ViewState enabled or disabled with TextBox has no impact
on TextBox keeping the value, even if it would be disabled as it doesn't use
ViewState to keep the value over postback. More info about that:
http://blogs.aspadvice.com/joteke/a.../03/15/767.aspx
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"Gill Smith" <gillSmith@.hotmail.com> wrote in message
news:OXQ%23b44PEHA.1312@.TK2MSFTNGP12.phx.gbl...
> After setting the web control text box enable property to FALSE makes the
> control to loose the data between round trip. I am making sure that the
> property - EnableViewState = TRUE.
> Same code when the text box Enable property set to TRUE retains the value.
> Please advice.
> -Gill
>
I want to skip the tabbing navigation for the text box.
How to do that ? Making read only property is not helpfull.
Gish
"Teemu Keiski" <joteke@.aspalliance.com> wrote in message
news:O2kHySCQEHA.3420@.TK2MSFTNGP11.phx.gbl...
> Hi,
> this is related to the HTML standard. Setting Enabled to False on form
> control renders it as disabled HTML element (in case of TextBox, <input
> type="text" disabled="disabled"...> ). And disabled element's value is not
> posted with the form. Take a look at:
> http://www.w3.org/TR/REC-html40/int...html#h-17.12.1
> By the way, having ViewState enabled or disabled with TextBox has no
impact
> on TextBox keeping the value, even if it would be disabled as it doesn't
use
> ViewState to keep the value over postback. More info about that:
> http://blogs.aspadvice.com/joteke/a.../03/15/767.aspx
> --
> Teemu Keiski
> MCP, Microsoft MVP (ASP.NET), AspInsiders member
> ASP.NET Forum Moderator, AspAlliance Columnist
> http://blogs.aspadvice.com/joteke
>
>
> "Gill Smith" <gillSmith@.hotmail.com> wrote in message
> news:OXQ%23b44PEHA.1312@.TK2MSFTNGP12.phx.gbl...
the
value.
>
You could manually store the text value in the ViewState yourself, leave
the textbox disabled, and then manually restore the value from ViewState
on postback.
Or ... you might be able to wire to the textbox's change event, and then
just reset it to the old value there. Not sure about that one.
-Jason
Gish Smith wrote:
> I want to skip the tabbing navigation for the text box.
> How to do that ? Making read only property is not helpfull.
> Gish
> "Teemu Keiski" <joteke@.aspalliance.com> wrote in message
> news:O2kHySCQEHA.3420@.TK2MSFTNGP11.phx.gbl...
>
> impact
>
> use
>
> the
>
> value.
>
>
Instead of all these steps is there any way I can skip tab stop on the text
box. I want to skip the tab sequense on this control. Disabling the control
is stopping the tab stop but will loose the data between trips.
Thanks for your advice.
"Jason DeFontes" <jason@.defontes.com> wrote in message
news:uCXvaLDQEHA.252@.TK2MSFTNGP10.phx.gbl...
> You could manually store the text value in the ViewState yourself, leave
> the textbox disabled, and then manually restore the value from ViewState
> on postback.
> Or ... you might be able to wire to the textbox's change event, and then
> just reset it to the old value there. Not sure about that one.
> -Jason
> Gish Smith wrote:
not
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment