"Toty Santana" <To*********@community.nospamwrote in message
news:E5**********************************@microsof t.com...
>i have a textbox server control whos value is being changed using
javascript.
when the text is changes and i post back to the server the Text change is
not reflected, instead i get blank string.
if the TextBox enabled property is set to true , everything works fine.
any ideas?
Yep - this is, ahem, "standard" behaviour... :-)
Thankfully, the solution is simple enough, though: don't set the textbox
readonly property in the HTML markup - do it in code instead. E.g.
Don't do this:
<asp:TextBox = ID="MyTextBox" runat="server" Enabled="false" />
Do this instead:
<asp:TextBox = ID="MyTextBox" runat="server" />
And in the page's Page_Load event, do this:
MyTextBox.Attributes.Add("disabled", "true");
It's the same with the readonly attribute...