checkbox in server control modified or not page.request question

  • Thread starter Thread starter ton
  • Start date Start date
T

ton

Hi,
I have a checkbox in a webserver control.

Al modified fields (textboxes, dropdownlists, and checkboxes) will be
examnied during a save method. In which I use:
aa= Page.Request(Replace(ClientID, "_", "$") & "$Check" & i &
ClientID).ToString
aa = Page.Request(Replace(ClientID, "_", "$") & "$Text" & i &
ClientID).ToString
aa = Page.Request(Replace(ClientID, "_", "$") & "$Combo" & i &
ClientID).ToString

in which I use page.request(name of control) to see what is changed

I recieve an "on" if the checkbox is checked, bt nothing if it is set to
off. Offcourse I can values by getting the exact field using:
dbCheck = FindControl("Check" & i & ClientID, 0) and that checking the
dbCheck.checked value

but then I would execute an update statement whether it is or is not changed

please help


ton
 
use UniqueID instead of ClientID to look values in the Request. the browser
will only postback a checkbox or radio button value if they are checked. so
you can tell its not checked because its not postback collection.

-- bruce (sqlwork.com)
 
Back
Top