Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > checkbox in server control modified or not page.request question

Reply
Thread Tools

checkbox in server control modified or not page.request question

 
 
ton
Guest
Posts: n/a
 
      11-14-2008

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



 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      11-14-2008
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)


"ton" wrote:

>
> 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
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie question - Can a kludgy page be modified before loading and sending back to server ? Attila.Iskander HTML 14 09-22-2011 09:58 PM
checkbox value attribute in checkbox control ? Imran Aziz ASP .Net Web Controls 2 08-08-2005 11:12 AM
Text on Checkbox below the checkbox tshad ASP .Net 0 04-14-2005 11:26 PM
Reading Select control from server side which was modified on the client side Azmarae ASP .Net 1 03-03-2004 08:06 PM
Custom Server Control can't hold modified status ton ASP .Net Building Controls 1 02-13-2004 03:48 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57