I have a basic app using the ASP.NET membership provider. By default, you can use a few fields such as username\password\remember me. How do I add to the asp.net membership provider so I can add an additional field "address" in the register section and have it save to the database. I currently see the following when creating a user in the account model:
public MembershipCreateStatus CreateUser(string userName, string password, string email)
{
if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
if (String.IsNullOrEmpty(password)) throw new ArgumentException("Value cannot be null or empty.", "password");
if (String.IsNullOrEmpty(email)) throw new ArgumentException("Value cannot be null or empty.", "email");
MembershipCreateStatus status;
_provider.CreateUser(userName, password, email, null, null, true, null, out status);
return status;
}
In the create user function, I also want to save the user's "address".
In the register.aspx I added a the following:
<div class="editor-label">
<%: Html.LabelFor(m => m.Address) %>
</div>
<div class="editor-field">
<%: Html.TextAreaFor(m => m.Address) %>
</div>
Any ideas?