I have Checkbox list from database
and selection list also from database
i can fill check boxlist from db in below
i have one datatable for selection items
i want that values to be selected in this checklist.
dt pagelist have 1 to 10
dt checklist have 1,3,5,7
DataTable dt = obj.checklist();
public void pagelist()
{
DataTable pl = obj.pagelist();
foreach (DataRow row in pl.Rows)
{
ListItem item = new ListItem();
item.Text = row["Previlage_pageName"].ToString();
item.Value = row["Previliges_ID"].ToString();
CHpagelist.Items.Add(item);
}
}