developer155
Programmer
I have a repeater control that show properties and a check box next to each. Users click check box to mark the prop they are interested in. I need some way to identify the property. Here is what I have so far, I can go and identify which box is checked, but I can find the corresponding property. Any tip is appreciated
Code---------------------------
<ItemTemplate>
<tr bgcolor="#ffcccc">
<td>
<asp:CheckBox id="PropCheck" runat="server"></asp:CheckBox></td>
<td><asp:Label ID="PropName" Runat="server"><%#DataBinder.Eval(Container.DataItem,"fPropName") %></asp:Label></td>
Here is code for it:
for (int i=0; i<PropRepeater.Items.Count; i++)
{
String isChecked = ((CheckBox) PropRepeater.Items.FindControl("PropCheck")).Checked.ToString();
if (isChecked == "True")
somevar=(Label)(PropRepeater.Items.FindControl("PropName").t.ToString();
}
thanks!!!
Code---------------------------
<ItemTemplate>
<tr bgcolor="#ffcccc">
<td>
<asp:CheckBox id="PropCheck" runat="server"></asp:CheckBox></td>
<td><asp:Label ID="PropName" Runat="server"><%#DataBinder.Eval(Container.DataItem,"fPropName") %></asp:Label></td>
Here is code for it:
for (int i=0; i<PropRepeater.Items.Count; i++)
{
String isChecked = ((CheckBox) PropRepeater.Items.FindControl("PropCheck")).Checked.ToString();
if (isChecked == "True")
somevar=(Label)(PropRepeater.Items.FindControl("PropName").t.ToString();
}
thanks!!!