J
John Holmes
I am using radioButton controls in a data repeater and would like to
incorporate the 'key' field into the 'id' attribute of the radioButton
controls and name them something like:
'rad' + '<%# (string)DataBinder.Eval(Container.DataItem, "ParcelID") %>' +
PropType1
I think part of the problem is that intially there is no data bound to this
repeater section. The data doesn't get built until the user clicks a button
on the form and then the repeater gets populated. But I'm not sure of the
syntax for concatenating strings for an attribute in HTML. A code snippet is
below that just has the 'key' field without any concatenation as the 'id'
attribute. This doesn't work and gives the following error message:
Parser Error Message: '<%# (string)DataBinder.Eval(Container.DataItem,
"ParcelID") %>' is not a valid identifier.
<tr>
<td bgcolor="#eeeeee" colspan="5">Classified or designated as forest land?
Chapter 84.33 RCW</td>
<td style="WIDTH: 75px" align="center">
<asp:CheckBox id='<%# (string)DataBinder.Eval(Container.DataItem,
"ParcelID") %>' runat='server' Checked='<%#
(bool)DataBinder.Eval(Container.DataItem, "ForestLand") %>' Enabled=false>
</asp:CheckBox></td>
</tr>
NOTE that all the other bound references work fine. Please help.
Thanks,
John Holmes
(e-mail address removed)
incorporate the 'key' field into the 'id' attribute of the radioButton
controls and name them something like:
'rad' + '<%# (string)DataBinder.Eval(Container.DataItem, "ParcelID") %>' +
PropType1
I think part of the problem is that intially there is no data bound to this
repeater section. The data doesn't get built until the user clicks a button
on the form and then the repeater gets populated. But I'm not sure of the
syntax for concatenating strings for an attribute in HTML. A code snippet is
below that just has the 'key' field without any concatenation as the 'id'
attribute. This doesn't work and gives the following error message:
Parser Error Message: '<%# (string)DataBinder.Eval(Container.DataItem,
"ParcelID") %>' is not a valid identifier.
<tr>
<td bgcolor="#eeeeee" colspan="5">Classified or designated as forest land?
Chapter 84.33 RCW</td>
<td style="WIDTH: 75px" align="center">
<asp:CheckBox id='<%# (string)DataBinder.Eval(Container.DataItem,
"ParcelID") %>' runat='server' Checked='<%#
(bool)DataBinder.Eval(Container.DataItem, "ForestLand") %>' Enabled=false>
</asp:CheckBox></td>
</tr>
NOTE that all the other bound references work fine. Please help.
Thanks,
John Holmes
(e-mail address removed)