Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["id"]))
            {
                Use u = new Use();
                u = Use.Fetch(Convert.ToInt32(Request.QueryString["id"].ToString()));

                txtFirstname.Text         = u.UserFname;
                txtSecondname.Text        = u.UserLname;
                txtAddress1.Text          = u.UserAdd1;
                txtAddress2.Text          = u.UserAdd2;
                txtCity.Text              = u.UserCity;
                DdlState.SelectedIndex    = u.StateID; // Double check this
                txtZip.Text               = u.UserZip;
                txtUsername.Text          = u.UserName;
                txtPassword.Text          = u.UserPassword;
                txtConfirmPass.Text       = u.UserPassword;
                txtEmail.Text             = u.UserEmail;
                txtConfirmEmail.Text      = u.UserEmail;
                txtPhone.Text             = u.UserPhone;
                rblIsActive.SelectedValue = u.Active.ToString();
            }
        }
    }