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
  • 64,877
  • 28
  • 152
  • 226
haydnD
  • 2,175
  • 5
  • 24
  • 54

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: http://www.4guysfromrolla.com/articles/101106-1.aspx

kubal5003
  • 7,116
  • 8
  • 48
  • 87
0

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

Hope this will help you

Community
  • 1
  • 1
Display Name
  • 4,714
  • 1
  • 31
  • 43