protected override void OnPreInit(EventArgs e)
{
if (Session["UserID"] != null)
{
string thm;
thm = (string)Session["Theme"];
if (thm != null)
{
Page.Theme = thm;
}
else
{
Page.Theme = "Theme1";
}
if (Convert.ToString(Session["RoleName"].ToString().Trim()) == "SuperAdmin")
{
string masterfile = "../SuperAdmin/SuperAdmin.master";
if (!masterfile.Equals(string.Empty))
{
base.MasterPageFile = masterfile;
}
}
else if (Convert.ToString(Session["RoleName"].ToString().Trim()) == "Administrator")
{
string masterfile = "../Admin/CollegeAdmin.master";
if (!masterfile.Equals(string.Empty))
{
base.MasterPageFile = masterfile;
}
}
else if (Convert.ToString(Session["RoleName"].ToString().Trim()) == "Student")
{
string masterfile = "../Users/UserMasterPage.master";
if (!masterfile.Equals(string.Empty))
{
base.MasterPageFile = masterfile;
}
}
base.OnPreInit(e);
}
else
{
Response.Redirect(LCE.Configuration.GetRootPath().ToString() + "/Login.aspx", false);
}
}
Thursday, February 4, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment