Thanks for the help. The hidden field idea got me to thinking about using
more Javascript. It will work nicely for me to have the checkbox "appear"
disabled by changing this.checked when they click and disable the tab stop
in ASP.NET
Modified from something found on the web:
Public Sub MakeReadOnly(ByRef CheckBox As CheckBox)
CheckBox.Attributes.Add("onClick", "this.checked=!this.checked;")
CheckBox.TabIndex = -1
End Sub
Web link for source:
http://www.mcse.ms/archive110-2004-6-659756.html
Thanks again,
- Marc
"Patrice" <nobody@nowhere.com> wrote in message
news:uE05kJUWEHA.1656@TK2MSFTNGP09.phx.gbl...[color=blue]
> When you submit a form, the value for the disabled HTML controls are not
> posted back to the server.
>
> - You could use an hidden field.
> - Or if the user is not allowed to change this (even indirectly), don't[/color]
try[color=blue]
> to update this value but read the original value server side (you knwo the
> user can't have changed this value ?)
> - Or reenable the field client side just before submitting (probably bad
> visually unless you display a please wait message while processing the
> values).
> - Others ?
>
>
> --
>
> "Marc Castrechini" <mc@merchantwareh4o3u2s1e.com> a écrit dans le message[/color]
de[color=blue]
> news:%230L9lDUWEHA.2408@tk2msftngp13.phx.gbl...[color=green]
> > More:
> > I just realized that I have the checkbox disabled because the user isn't
> > allowed to change the checked value manually and I don't want the tab[/color]
> stop.[color=green]
> >
> > I see now that if the control is enabled the value returns properly.
> > Javascript allows the value to change even if the control is disabled.
> >
> > Does anyone know how I can keep the control disabled but get a current
> > checked value from it? Later in the code I am using that[/color][/color]
chkMyCB.checked[color=blue][color=green]
> > value.
> >
> > TIA,
> > - Marc Castrechini
> >
> > "Marc Castrechini" <mc@merchantwareh4o3u2s1e.com> wrote in message
> > news:eXtrv9TWEHA.716@TK2MSFTNGP11.phx.gbl...[color=darkred]
> > > I have a page that changes an <ASP:Checkbox value based on a user[/color][/color]
> entered[color=green][color=darkred]
> > > value in a textboxm using client side Javascript.
> > >
> > > After my submit is fired the value for the chkMyCB.checked does not[/color][/color][/color]
get[color=blue][color=green]
> > the[color=darkred]
> > > latest value of the checkbox.
> > >
> > > Does this sound like a posibility and if so how can I force the server[/color][/color]
> to[color=green][color=darkred]
> > > get the new value from the page?
> > >
> > > TIA,
> > > - Marc Castrechini
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]