S
sonic
I realize that if a field is disabled, its value will not be posted to
server.
i realize that .Enabled = false, produces disabled="disabled" markup
i still don't see a good way to disable a field using javascript and
than check for that on the server.
if i render a regular textbox
<asp:Textbox id="txt" runat="server" />
than on client do:
txt.disabled = true; // this disables the control correctly.
than on server
txt.Enabled is true
txt.Attributes.Count is 0
if I do this on the server
txt.Attributes.Add("disabled","false");
it renders to client and is available on postback, but if i change the
value on the client to false, it does not see the new value ( because
http postback does not read values of disabled fields ) but how do i
figure out on server if an element was enabled/disabled by javascript?
server.
i realize that .Enabled = false, produces disabled="disabled" markup
i still don't see a good way to disable a field using javascript and
than check for that on the server.
if i render a regular textbox
<asp:Textbox id="txt" runat="server" />
than on client do:
txt.disabled = true; // this disables the control correctly.
than on server
txt.Enabled is true
txt.Attributes.Count is 0
if I do this on the server
txt.Attributes.Add("disabled","false");
it renders to client and is available on postback, but if i change the
value on the client to false, it does not see the new value ( because
http postback does not read values of disabled fields ) but how do i
figure out on server if an element was enabled/disabled by javascript?