protected void Page_Load(object sender, EventArgs e) { if (Session["UserId"] == null) { Response.Redirect(System.Web.Security.FormsAuthentication.LoginUrl.ToString() + "?ReturnUrl=" + Request.RawUrl.ToString()); } else { DataTable _dt = new DataTable(); int UserId = Convert.ToInt32(Session["UserId"]); _dt = objStudent.GetMyProfileInfo(UserId); HdnClassId.Value = Convert.ToString(_dt.Rows[0]["ClassId"]); HdnstudId.Value = UserId.ToString();//Convert.ToString(_dt.Rows[0]["StudentId"]); SqlParameter param = new SqlParameter(); grdStagePlan.DataSource = objStudent.GetStudentStagePlan(HdnClassId.Value, HdnstudId.Value); grdStagePlan.DataBind(); } if (!IsPostBack) { try { //if (Session["UserRoleId"].ToString() == "5") //{ // DataTable dt = objStudent.GetSchoolInfo(Convert.ToInt32(Session["UserId"])); // if (dt.Rows.Count > 0) // { // h1_ClassForum.InnerHtml += "- " + dt.Rows[0]["Class"].ToString() + " " + dt.Rows[0]["School"].ToString(); // } //} ddlCompetitionCity.DataBind(); ddlCompetitionCity.SelectedValue = Session["UserCityId"].ToString(); GetData(ddlCompetitionCity.SelectedValue.ToString()); _BindData(); ScriptManager.RegisterStartupScript(Page, this.GetType(), "Temp", "ScrollPosition();", true); lbtnAllScore.Visible = false; } catch (Exception ex) { } } }