protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { UserThings work = new UserThings(); int id = Int32.Parse(Session["UserId"].ToString()); String[] UserInfo = new String[4]; Array.Copy(work.GetUserData(id), UserInfo, 4); UserName.Text = UserInfo[0]; Email.Text = UserInfo[3]; FirstName.Text = UserInfo[1]; LastName.Text = UserInfo[2]; } }
protected void Page_Load(object sender, EventArgs e) { UserThings work = new UserThings(); int id = Int32.Parse(Session["UserId"].ToString()); String[] UserInfo = new String[4]; Array.Copy(work.GetUserData(id), UserInfo, 4); UserName.Text = UserInfo[0]; if (UserInfo[1] == null) { FirstName.Text = "Not Advalible"; } else { FirstName.Text = UserInfo[1]; } if (UserInfo[2] == null) { LastName.Text = "Not Advalible"; } else { LastName.Text = UserInfo[2]; } if (UserInfo[3] == null) { Email.Text = "Not Advalible"; } else { Email.Text = UserInfo[3]; } }