protected void Page_Load(object sender, EventArgs e) { try { if (Session["username"] != null && Session["password"] != null) { P.AdminUpdateFetchProfileID = 2; dt = F.AdminFetchAdmin(P); imgadminlogo.Src = dt.Rows[0][8].ToString().Trim(); hflname.InnerText = dt.Rows[0][1].ToString().Trim(); tbgender.InnerText = dt.Rows[0][2].ToString().Trim(); tbfulname.InnerText = dt.Rows[0][1].ToString().Trim(); tbmartial.InnerText = dt.Rows[0][3].ToString().Trim(); tbdate.InnerText = Convert.ToDateTime(dt.Rows[0][4]).ToLongDateString(); tbphone.InnerText = dt.Rows[0][5].ToString().Trim(); tbemail.InnerText = dt.Rows[0][6].ToString().Trim(); } else { Response.Redirect("SignIn.aspx"); } } catch (Exception ex) { } }