Code
DataTable dt = new DataTable();
DataList1.DataSource = dt;
DataList1.DataBind();
DataList2.DataSource = dt;
DataList2.DataBind();Design Page
Bash
asp:DataList runat="server" ID="DataList1" RepeatDirection="Vertical">
ItemTemplate>
table width="290px">
tr>
td align="left">asp:CheckBox ID="chkBttn" CssClass="chck_btn" ToolTip='' Text='' Checked="false" runat="server" OnCheckedChanged="CheckBox_CheckedChanged" AutoPostBack="true" />/td>
td align="right" width="40px">asp:Label ID="ExtraPrice" Text='' runat="server">/asp:Label> /td>
/tr>
/table>
/ItemTemplate>
/asp:DataList>
asp:DataList runat="server" ID="DataList2" RepeatDirection="Vertical">
ItemTemplate>
table width="290px">
tr>
td align="left">asp:CheckBox ID="chkBttn" CssClass="chck_btn" ToolTip='' Text='' Checked="false" runat="server" OnCheckedChanged="CheckBox_CheckedChanged" AutoPostBack="true" />/td>
td align="right" width="40px">asp:Label ID="ExtraPrice" Text='' runat="server">/asp:Label> /td>
/tr>
/table>
/ItemTemplate>
/asp:DataList>There is two checkbox group which have same datasource, so in both case same checkbox are showing and also same event is firing for both. Here is the event code
Code
protected void CheckBox_CheckedChanged(object sender, EventArgs e)
{
string OpService = ((CheckBox)sender).Text;
}Now what i want to do is, while check one checkbox from the 1st checkbox group the same checkbox should be selected from the second checkbox group automatically, also if i deselect one checkbox that should be deselect from both checkbox group.
Please guide me to solve this.
Thanks in advance.


Answers
Know the answer? Post it. Somebody with the same question will find it here.