protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { user = (User)Session["UserInfo"]; this.RadGrid.DataBind(); ObjectDataBind.RadCmbDataBind(this.cmbUserTypeId, new UserRepository(), "SelectAllProfessors", "UserName", "UserId"); } this.msg.Text = ""; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { user = (User)Session["UserInfo"]; if (user.UserType != 1) { Response.Redirect("~/View/AdminPanel/UserPanel.aspx"); } this.RadGrid.DataBind(); ObjectDataBind.RadCmbDataBind(this.cmbUserTypeId, new UserTypeRepository(), "SelectAll", "Slug", "UserTypeId"); } this.msg.Text = ""; }