Reputation: 4129
I am using aspnet boilerplate template. In that inbuilt registration consist for some default fields only. How can i add new custom fields, so that when user registers they want to enter that also?
public class User : AbpUser<User>
if i create a attribute in this class it will work?
Upvotes: 0
Views: 2110
Reputation: 43073
Follow these steps:
User
.RegisterInput
.register.component.html
.Bind the property in AccountAppService
's Register
method:
user.MyProperty = input.MyProperty;
User
.RegisterViewModel
.Register.cshtml
.Bind the property in AccountController
's Register
method:
user.MyProperty = model.MyProperty;
Upvotes: 3