checkbox with string values

Results 1 to 2 of 2

Thread: checkbox with string values

  1. #1
    Join Date
    Dec 1969

    Default checkbox with string values

    Hi,<BR>I have to create a CheckBox, and i would like will be checked if there is a <BR>value in a property added, and not checked if there is another value.<BR><BR>I added 2 property (string) to the checkbox; the first , CheckedValue is the <BR>value for whom i want the check will be checked. The second is the opposite.<BR>I Added a handler to the checkbox in this way:<BR><BR>this.DataBinding+=new EventHandler(AreaITWebCheckBox_DataBinding);<BR><B R>and <BR><BR>private void AreaITWebCheckBox_DataBinding(object sender, EventArgs e)<BR>{<BR>}<BR><BR>I binded another new property (Valore) in this way:<BR><BR>DataBinder.Eval(dsGestione1, "Tables[RUOLO].DefaultView.[0].IND_ADM")<BR>where IND_ADM can have value "S" or "N".<BR><BR>The question is:<BR>How can i acced to the value of property Valore from the eventHandler?<BR>If this is not possible, how can I realize this component in another way?<BR><BR>Sincerely<BR>Alessandro<BR>

  2. #2
    Join Date
    Dec 1969

    Default while your msg makes no sense to me

    your subject does if you are asking how you can have:<BR><BR>&#060;input type="checkbox" value="Some String" id="Whatever" /&#062;<BR><BR>instead of using the &#060;asp:CheckBox&#062; use &#060;asp:CheckBoxList&#062; (even if its only one checkbox), as that has a "Value" parameter to it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts