At Degin time
<asp:DataList runat="server" ID="chkAuction">
<ItemTemplate>
<td valign="top">
<asp:CheckBox runat="server" ID="chkSelect" />
<asp:HiddenField runat="server" ID="hdnSelect" Value='<%#
dataBinder.Eval(Container, "DataItem.SubCategoryID") %>' />
</td>
<td valign="top">
<asp:Label ID="lblSelecet" runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.SubCategoryName")
%>'></asp:Label>
</td>
</ItemTemplate>
</asp:DataList>
At Code Behind
protected string GetSelectedSubCategory()
{
string catID = "";
foreach (DataListItem li in chkSale.Items)
{
if (((CheckBox)li.FindControl("chkSelect")).Checked == true)
{
//catID += ((HiddenField)li.FindControl("hdnSelect")).Value.ToString() + ";";
}
}
}
But
I'm not able to access the hidden field's value, just return me blank
if I take the display text then it gives me, but I require hidden
field's value, binding coding is done on page load and it working
properly
It's also not working it return me the hdnSelect.Value is blank, why its not working, ITs binding propery in hdnSelect.value
when I'm debug it, it goes at that point, means there is not prob with
binding. rather it is not picked up the value just return blank. my
prob is that I can not use html control in it.
Please help in this issue, thank in advance