Video instructions and help with filling out and completing When Form 2220 Entities

Instructions and Help about When Form 2220 Entities

Hi all welcome to dr. Bob myself shams here in this video we will discuss how to create user registration form in MVC applications in the previous video we have discussed how to create a user loading page and also some in MVC application so you can combine these two Google names in your upcoming NBC projects to make a complete user login and logout system with user registration form related video links will be there in video description and in the top most common of this video please go through that let me create the efficient VC application for that with file the new project select web and efficacy shaft then a speed or net web application name your application here select the location where you want to see the application and click on ok and select community keep others as it is click on ok that's it we have our fresh brand-new to BC application here let me open my management studio here we have a DB a baby and it contains only one table you sir and its design looks like this it contains four columns because the ID username password and is admin user ID is the primary key for the table identity specification is given for user ID column because of that you don't want to insert values into the column SQL Server will take care of that it will start from 1 then incremented by 1 upon new recording session currently we use establish empty now let me an ad about that entity model of our database into order folder for that right click on model then add new item select data then selected your door Content ID data model name your model here click on that keep it Cassidy's generate from database click on next then click on your connection then specify you ask yourself instance NIMH you just select your DB in my case it is AB DB click on OK then I want to change this name in app config as VB models click on next then select the objects that we need in our entity model in our case we have only one user table so I'm select user click on finish so this is our entity model diagram for user tab so under models you can see you sir class here this is auto-generated by adding a do go to identity model so we will be using this use a plus for our model class purpose now let me add user controller for that right click on controllers then add controller select empty controller name your controller user controller click on air instead of index action we need add or edit action with ID as parameter by default it will be 0 now let me go be renamed space of you subclass into your controller and I'm going to create useful objects inside the action and CEO model and then passing the object interview now we need to create every with name add already for that I click on View and click on add view keep the name as it is select the template as create then selecting model cause as user check the user layout page click on add this is our add or edit view which is created using MVC scaffolding mechanism let me run the application now for that whole Kangol then press f5 so this is how the user registration page looks like and in the you know the code you can see that we have not specified any layout page here so it will take the default layout page as underscore layout CF HTML and here you can see it set the page title from view back door title so here we have passed view back tot title has a door it as Y you can see and or editing the title so first of all we need to change the hand of editing to user registration and then you can see to head the part here when he said already and user instead of that we need only one header h2 header as user registration and then you can see the submit button has quit instead of that and I need it has submit so that you can change the value of the button as submit and finally we have the link as back to this so let's get rid of that let me reload the page now now it looks fine so here we need to add controls for confirm password for that we need to add confirm password property into you circles for that string confirm password and I want to change the display name as display name for this you need to use the using statement system got combined model display name will be confirm space password and I'm going to update the add or edit view for that copying the default password and passing the changing password to confirm password let me build the solution reload the page so here we have the same eye controls for confirm password now we need to add some client-side validation into our user registration form in order to work with a kind set violation we need three scripts file first one is jQuery library itself and then we need daiquiri validate and jQuery validate God and go stream so here we have added daiquiri here in layout page and in the add already we have included a jQuery validate and jQuery while their code and boskie file now we need to specify the validation rules in our user cost before that we need to show the text inside the password and confirm password text box has lots for that you can use data type attribute for that you have to use the namespace system got component model dot that annotation inside the attribute you need to specify that at type as passwords saying for confirm password also now we are going