Beispiel #1
0
        protected void BtnSave_Click(object sender, EventArgs e)
        {
            UserProfile u = new UserProfile();

            u.FirstName  = TxtFname.Text;
            u.Lastname   = TxtLname.Text;
            u.Email      = TxtEmail.Text;
            u.Phone      = TxtPhone.Text;
            u.HouseName  = TxtHouseName.Text;
            u.Street     = TxtStreet.Text;
            u.City       = TxtCity.Text;
            u.State      = TxtState.Text;
            u.Country    = TxtCountry.Text;
            u.Zip        = int.Parse(TxtZip.Text);
            u.Profilrpic = FileUpload1.FileName;
            FileUpload1.SaveAs(Server.MapPath("~/ProfilePicture/" + FileUpload1.FileName));
            u.UserId = User.Identity.GetUserId();
            UserProfileHelper.InsertUserProfile(u);
        }