Create Simple Registration Form in ASP.Net

Create Registration Form with TextBox control in ASP.Net

- In this ASP.Net Tutorial we will learn, how to create simple Registration form with validation control in ASP.Net.

- For Design this form bring the Four TextBox Control and One Button Control and Four RequiredField Validator Control.

Simple Registration Form in ASP.Net

Simple Registration Form in ASP.Net

- write below code in Body tag:-

<body>
    <form id=”form1″ runat=”server”>
<table>
                        <tr>
                            <td style=”width: 100px”>
                            </td>
                            <td style=”width: 100px”>
                            </td>
                            <td style=”width: 100px”>
                            </td>
                        </tr>
                        <tr>
                            <td style=”width: 100px; text-align: right”>
                                Enter Name :</td>
                            <td style=”width: 100px”>
                                <asp:TextBox ID=”txtname” runat=”server” ></asp:TextBox></td>
                            <td style=”width: 100px; text-align: left”>
                                <asp:RequiredFieldValidator ID=”RequiredFieldValidator1″ runat=”server” ControlToValidate=”txtname”
                                    ErrorMessage=”Enter Name !!”></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td style=”width: 100px”>
                                Enter Surname :</td>
                            <td style=”width: 100px”>
                                <asp:TextBox ID=”txtsurname” runat=”server” ></asp:TextBox></td>
                            <td style=”width: 100px; text-align: left”>
                                <asp:RequiredFieldValidator ID=”RequiredFieldValidator2″ runat=”server” ControlToValidate=”txtsurname”
                                    ErrorMessage=”Enter Suname !!”></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td style=”width: 100px; text-align: right”>
                                City :</td>
                            <td style=”width: 100px”>
                                <asp:TextBox ID=”txtcity” runat=”server”></asp:TextBox></td>
                            <td style=”width: 100px; text-align: left”>
                                <asp:RequiredFieldValidator ID=”RequiredFieldValidator3″ runat=”server” ControlToValidate=”txtcity”
                                    ErrorMessage=”Enter City !!”></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td style=”width: 100px; text-align: right”>
                                Pincode :</td>
                            <td style=”width: 100px”>
                                <asp:TextBox ID=”txtpincode” runat=”server”></asp:TextBox></td>
                            <td style=”width: 100px; text-align: left”>
                                <asp:RequiredFieldValidator ID=”RequiredFieldValidator4″ runat=”server” ControlToValidate=”txtpincode”
                                    ErrorMessage=”Enter Pincode”></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td style=”width: 100px; text-align: right; height: 34px;”>
                            </td>
                            <td colspan=”2″ style=”text-align: left; height: 34px;”>
                                <asp:Button ID=”Button1″ runat=”server” Font-Bold=”True” Height=”32px” Text=”Submit”
                                    Width=”80px” OnClick=”Button1_Click” /></td>
                        </tr>
                        <tr>
                            <td style=”width: 100px; text-align: right”>
                            </td>
                            <td colspan=”2″ style=”text-align: left”>
                                <asp:Label ID=”Label1″ runat=”server” Font-Bold=”True”></asp:Label></td>
                        </tr>
                        <tr>
                            <td style=”width: 100px; text-align: right”>
                            </td>
                            <td colspan=”2″ style=”text-align: left”>
                            </td>
                        </tr>
                    </table></form>
</body>

 

write below code in Button click Event:-

 protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = “Form Submitted Successfully !!”;
    }

Simple Registration Form in ASP.Net

Simple Registration Form in ASP.Net

Simple Registration Form in ASP.Net

Simple Registration Form in ASP.Net

- I hope you will learn this ASP.Net TextBox Example Tutorials.

Simple Registration Form in ASP.Net

Simple Registration Form in ASP.Net

Leave a Reply

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

8 + 3 =


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="">