Jishu das

Jishu das

  • NA
  • 106
  • 7.2k

i click one checkbox other checkbox will disable in datalist

Feb 27 2015 11:37 AM
i have many checkbox in datalist.when i click one checkbox then other
checkbox will be disable. how i will solve it by asp.net using csharp.

here is my code sample:

<asp:DataList ID="DataList" runat="server" RepeatColumns="3"
RepeatDirection="Horizontal"
Width="50%" BorderColor="#336699" BorderStyle="Solid" BorderWidth="2px" >

<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#
Eval("ProductName") %>' Font-Bold="True"
Font-Size="10pt" ForeColor="#336699" Width="100%" />
<br />
<asp:Image ID="Image1" runat="server" Width="100px" Height="120px"
ImageUrl='<%# "GetImage.aspx?id=" + Eval("ProductID") %>' />
<input runat="server" id="FavChkBox" type="checkbox"
oncheckchanged="CheckedChanged" />
<asp:HiddenField ID="HiddenCatID" runat="server" Value='<%#
Eval("ProductID") %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top" />
</asp:DataList>



Answers (1)