if (HttpContext.Current.User != null) { if (Session["username"] != null) { string pageName = Page.Page.AppRelativeVirtualPath.Substring(Page.Page.AppRelativeVirtualPath.LastIndexOf('/') + 1); DataTable dtFeatures2 = new DataTable(); dtFeatures2.Clear(); objMatermenuPL.usertype = Session["UserType"].ToString(); dtFeatures2 = objMastermenuBAL.GetMastermenu(objMatermenuPL); DataView dt = new DataView(dtFeatures2); dt.Sort = "fld_feature ASC"; if (dtFeatures2 != null) { foreach (Control control in leftpanel.Controls) { Type ty = control.GetType(); if (ty.Name.ToUpper() == "HTMLANCHOR") { int i = dt.Find(control.ID.Substring(3)); if (i < 0 && control.ID.Contains("lnk")) control.Visible = false; if (control.ID.Contains("lnk") && control.ID.Substring(3) + ".aspx" == pageName) { HtmlAnchor a = (HtmlAnchor)control; a.Attributes.Add("class", "active"); } } } } } } else { Response.Redirect("~/Login.aspx"); }
dtFeatures2 = objMastermenuBAL.GetMastermenu(objMatermenuPL);
if (dtFeatures2 != null) { // below codes inside the condition... DataView dt = new DataView(dtFeatures2); dt.Sort = "fld_feature ASC";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)