Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String username = Request.Cookies["user"].Value;

            if (!username.Equals("*****@*****.**"))
            {
                Response.Redirect("~/Default.aspx");
            }

            userID = int.Parse(Request.Params[0]);
            if (userID <= 0)
            {
                Response.Redirect("Customer.aspx");
            }

            db = new DbLayer();

            if (!this.IsPostBack)
            {
                SqlDataReader sr = db.GetUserByID(userID);
                sr.Read();
                tbUserName.Text = sr.GetString(3);
                tbEmail.Text    = sr.GetString(1);
                sr.Close();
                sr = null;
            }
        }