You are on page 1of 5

Practical No.

17
Developed by :- Ashish Pare
Aim :- Write a program to make registration form using asp.net controls.
Coding :-

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs"


Inherits="WebApplication4.WebForm2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title></title>

</head>

<body>

<form id="form1" runat="server">

<div>

<table>

<tr>

<td>First Name:</td>

<td><asp:TextBox ID="txtFirstName" runat="server" /></td>

</tr>

<tr>

<td>Last Name:</td>

<td><asp:TextBox ID="txtLastName" runat="server" /></td>

</tr>

<tr>

<td>Date Of Birth:[DD/MM/YYYY]:</td>

<td><asp:TextBox ID="DateOfBirth" runat="server" /></td>

</tr>
<tr>

<td>Select Your Gender:</td>

<td>

<asp:RadioButton ID="RadioButton1" runat="server" GroupName="gender" Text="Male" />

<asp:RadioButton ID="RadioButton2" runat="server" GroupName="gender" Text="Female" />

</td>

</tr>

<tr>

<td>

<asp:Label ID="Label" runat="server" Text="Select Your Course:"></asp:Label></td>

<td>

<asp:CheckBox ID="CheckBox1" runat="server" Text="B.C.A" />

<asp:CheckBox ID="CheckBox2" runat="server" Text="B.B.A" />

<asp:CheckBox ID="CheckBox3" runat="server" Text="B.sc" />

</td>

</tr>

</table>

<td>Select Your Hobbies:</td>

<td>

<asp:DropDownList ID="DropDownList1" runat="server">

<asp:ListItem Value="">Please Select Hobbies</asp:ListItem>

<asp:ListItem>Cricket</asp:ListItem>

<asp:ListItem>Football</asp:ListItem>

<asp:ListItem>Hocky</asp:ListItem>

<asp:ListItem>Tennis</asp:ListItem>

<asp:ListItem>Volly Ball</asp:ListItem>

</asp:DropDownList>

</tr>
</td>

<td>

<br />

Username:</td>

<td><asp:TextBox ID="txtUsername" runat="server" />

</td>

</tr>

<tr>

<td>

<br />

Password:</td>

<td><asp:TextBox ID="txtPassword" runat="server" TextMode="Password" /></td>

</tr>

<tr>

<td>

<br />

Confirm Password:</td>

<td><asp:TextBox ID="txtConfirmPassword" runat="server" TextMode="Password" /></td>

</tr>

<tr>

<td>

<br />

E-mail ID:</td>

<td><asp:TextBox ID="txtEmail" runat="server" />

<br />

</td>

</tr>

<tr>
<td>Mob No:</td>

<td><asp:TextBox ID="txtMobNo" runat="server" />

<br />

</td>

</tr>

<tr>

<td></td>

<button>

<td><asp:Button ID="Button" runat="server" Text="Submit" OnClick="Button_Click"


Width="108px"/>

</button>

</tr>

</table>

</div>

</form>

</body>

</html>

</div>

</form>

</body>

</html>
OUTPUT :-

You might also like