Welcome to FoxLearn
In this video, I'll show you how to implement the user registration page in ASP.NET MVC
You need to open your AccountViewModels class,
then add a UserName property to the RegisterViewModel class
Next, Open your AccountController,
then modify your Register action to allow you to store UserName
Next, Right-click on your Shared folder, then create a register partial view
A partial view is a reusable portion of a web page
It's special view which renders a portion of view content
It is just like a user control of a web form application
You need to add your RegisterViewModel to the register partial view,
then modify your layout allowing you to create accounts
Next, Open your login view,
then copy your register form into the register partial view
And don't forget to add your controller name and action name to the register partial view
Finally, You can replace the html form with the ASP.NET MVC form,
or you can use html tag,
but you need to set the name for the html tag to match the data fields in your model
As you can see, The login view is used for both login and account creation
I'll replace the registration form with a partial view
Oh, The error is I forgot to remove the Email Address property
You should delete it if you haven't already
Thank you for watching this video and don't forget to subscribe to my channel