protected void Page_Load(object sender, EventArgs e) { try { Session["Username"].ToString(); } catch { Response.Redirect("../Login.aspx"); } RequestViewWorkExperience request = new RequestViewWorkExperience(); request.Username = Session["Username"].ToString(); DataTable dt = DAT.ViewWorkExperience(request); if (dt.Rows.Count > 0) { GridView1.DataSource = dt; GridView1.DataBind(); } else { Response.Redirect("Employee_AddWorkExperience.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { Session["Username"].ToString(); } catch { Response.Redirect("../Login.aspx"); } RequestViewWorkExperience requestViewWorkExperience = new RequestViewWorkExperience(); requestViewWorkExperience.Username = Session["Username"].ToString(); DataTable dt = DAT.ViewWorkExperience(requestViewWorkExperience); GridView1.DataSource = dt; GridView1.DataBind(); }