protected void Page_Load(object sender, EventArgs e) { if (!Session["User"].Equals("")) { TaiKhoan tkUs = new TaiKhoan(); TaiKhoanBUL tkBUL = new TaiKhoanBUL(); int maNhanDuoc = int.Parse(Convert.ToString(Session["User"])); tkUs = tkBUL.getUserInfo(maNhanDuoc); HyperLink2.Text = "Xin chào: " + tkUs.TenTaiKhoan; HyperLink2.NavigateUrl = "Profile.aspx?Id=" + maNhanDuoc; } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Status"] != "") { TaiKhoan tkUs = new TaiKhoan(); TaiKhoanBUL tkBUL = new TaiKhoanBUL(); int maNhanDuoc = int.Parse(Session["Status"].ToString()); tkUs = tkBUL.getUserInfo(maNhanDuoc); lbTen.Text = tkUs.TenTaiKhoan; } else { Response.Redirect("Login.aspx"); } }