create simple registration form in asp.net with database c#

In previous asp.net post we have learned how  to create dynamic login form in asp.net using database. Now, in this tutorials we will  learn how to create simple registration from in asp.net using database.

create simple registration form in asp.net with database

create simple registration form in asp.net with database

For create registration from first, create a table in sql server for registration. we have here created table “UserMst” in sql server for store the registration data.

The sql table “UserMst” like :

create simple registration form in asp.net with database

create simple registration form in asp.net with database

Open Visual Studio and create a new web site –>> Design asp.net web form for user registration.

The HTML Source code of registration form :

The design of web form like :

create simple registration form in asp.net with database

create simple registration form in asp.net with database

Here, we use validation control for all textboxes in registration form. We use required field validator for all the textbox to check whether it is empty or not. and use Regular Expression Validation for check valid email textbox.

First add namespaces for sql connection.

using System.Data;
using System.Data.SqlClient;

The C# code for register button click :

 

Download ASP.Net Registration Example
asp.net example

Leave a Reply

Your email address will not be published. Required fields are marked *

4 + 5 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">