public void StudentSearchBox() { AbcDAL MyDAL = new AbcDAL(""); DataTable ResultTable = MyDAL.PopulateStudent(); MyDAL.BindStudentCombobox(RCBStudentName); }
protected void Page_Load(object sender, EventArgs e) { int AuthorityID = 0; AbcDAL MyDAL = new AbcDAL(""); if (!IsPostBack) { MyDAL.BindSubjectComboBox(RCBSubject); MyDAL.BindStudentCombobox(RCBStudent); //AbcDAL MyDAL = new AbcDAL(""); DataTable ResultTable = MyDAL.PopulateStudent(); AuthorityID = Convert.ToInt32(ResultTable.Rows[0]["AuthorityID"]); //Getting my field value if (AuthorityID != 1002) { Response.Redirect("~/default.aspx?MsgPos=5&MsgType=warning&MsgContent=You are not authorised to this function, No students allowed !!!!"); } } }