Since the writing of "database data encryption and decryption" http://www.cnblogs.com/insus/p/3434735.html. It also mentions Insus.net's ability to implement membership registration in an MVC application.
For some time, the work is busy, the star six is also on duty. Now is a sneak in, continue to write the MVC program.
This secondary implementation of membership registration function, from the simplest to start.
In the database, create a membership table [Member]
Note The data type of the password field, which is converted to binary since the password is encrypted. For encryption, you can join the link at the beginning of the article.
Next, complete the registered stored procedure [dbo]. [Usp_member_register]:
When writing stored procedures, pay attention to the password data type. The user input must be a character type, but not a binary type.
Now we can go to the MVC application and create a model:
Create an entity to communicate with the database.
Also create a controller:
After creating the controller MemberController.cs, in MVC5, it automatically creates a member directory under the Views directory. Next, of course, is to create a REGISTER.CSHTMLL view:
No style, no validation. Just a few basic text boxes. Finally, we need to complete the data submission function and write jquery Ajax:
Real-time Operation Demo:
The following is a record of the data: