Hey
Im trying to figure out why my code doesnt enter the second foreach loop??
am i missing something?
public void LoadPageAccess(int intRoleID)
{
Roles role = new Roles();
List<CRMDocLib2012Model.GetPageAccess_Result> GetPageAccess = role.GetPageAccess(intRoleID);
foreach (CRMDocLib2012Model.GetPageAccess_Result lst in GetPageAccess)
{
foreach (GridViewRow Item in gvPageAccess.Rows)
{
var chkbox = ((CheckBox)(Item.FindControl("cbPageAccess")));
var pageID = (Label)(Item.FindControl("lblPageID"));
if (Convert.ToInt32(pageID.Text) == lst.PageID)
{
chkbox.Checked = true;
}
}
}
}