1

I'm using sql membership provider and I'm wanting to add Shipping information when users register... The user is required to enter shipping info. What is the best way to approach this / how do I do it if possible?

public class RegisterModel
{
    [Required]
    [Display(Name = "User name")]
    public string UserName { get; set; }

    [Required]
    [DataType(DataType.EmailAddress)]
    [Display(Name = "Email address")]
    public string Email { get; set; }

    [Required]
    [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
    [DataType(DataType.Password)]
    [Display(Name = "Password")]
    public string Password { get; set; }

    [DataType(DataType.Password)]
    [Display(Name = "Confirm password")]
    [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
    public string ConfirmPassword { get; set; }
}

Thanks,

Mike Perrenoud
  • 66,820
  • 29
  • 157
  • 232
haydnD
  • 2,225
  • 5
  • 27
  • 61

2 Answers2

1

Membership provider is only for basic info. ASP.NET also has something like ProfileProvider. The out-of-the-box version shipped with ASP.NET stores information in XML in database along with the data of Membership Provider.

Classic tutorial: https://web.archive.org/web/20211020111657/https://www.4guysfromrolla.com/articles/101106-1.aspx

kubal5003
  • 7,186
  • 8
  • 52
  • 90
0

I just responded the same question. Please take a look here

Hope this will help you

Community
  • 1
  • 1
Display Name
  • 4,672
  • 1
  • 33
  • 43