Digital Jewellery Documentation
Digital Jewellery Documentation
Page
No. Program Name Sign
No
1 Design a Registration form Default.aspx page with fields Username,
choose password, confirm password, age, email id, mobileno and a
submit button.
Use:
a) RequiredFieldValidator - for Username
b) CompareValidator - for Confirm password field.
c) RangeValidator - for Age field. d)
d) RegularExpressionValidator - for Email field.
e) CustomValidator - for mobile no field.
2 Write a program to perform to design a simple calculator to perform
addition, subtraction, multiplication and division.
3 Design a user interface to print the result student with total marks and
percentage.
4 Write a program Day of the Date.
1. Design a Registration form Default.aspx page with fields Username, choose password,
confirm password, age, email id, mobileno and a submit button.
Use:
f) RequiredFieldValidator - for Username
g) CompareValidator - for Confirm password field.
h) RangeValidator - for Age field. d)
i) RegularExpressionValidator - for Email field.
j) CustomValidator - for mobile no field.
Default.aspx
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 62%;
}
.auto-style2 {
width: 124px;
}
.auto-style3 {
width: 21px;
}
.auto-style5 {
width: 124px;
height: 42px;
}
.auto-style6 {
width: 21px;
height: 42px;
}
.auto-style7 {
width: 140px;
}
.auto-style8 {
width: 140px;
height: 42px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td colspan="4" style="text-align: center">Registration Form</td>
</tr>
<tr>
<td class="auto-style2">Name</td>
<td class="auto-style3">:</td>
<td class="auto-style7">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
Page 1
ASP.NET
</td>
<td class="auto-style5">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="TextBox1" ErrorMessage="Please Enter
Name"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style2">Email</td>
<td class="auto-style3">:</td>
<td class="auto-style7">
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
<td class="auto-style5">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server" ControlToValidate="TextBox3" ErrorMessage="Please Enter Email Properly"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-
.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="auto-style2">Password</td>
<td class="auto-style3">:</td>
<td class="auto-style7">
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
</td>
<td class="auto-style5"> </td>
</tr>
<tr>
<td class="auto-style5">Confirm Password</td>
<td class="auto-style6">:</td>
<td class="auto-style8">
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
</td>
<td class="auto-style5">
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="TextBox4" ControlToValidate="TextBox5" ErrorMessage="Password and
Confirm Password must be same"></asp:CompareValidator>
</td>
</tr>
<tr>
<td class="auto-style2">Age</td>
<td class="auto-style3">:</td>
<td class="auto-style7">
<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
</td>
<td class="auto-style5">
<asp:RangeValidator ID="RangeValidator1" runat="server"
ControlToValidate="TextBox6" ErrorMessage="Age must Be 20 - 40." MaximumValue="40"
MinimumValue="20"></asp:RangeValidator>
</td>
</tr>
<tr>
<td class="auto-style2">Mobile No</td>
<td class="auto-style3">:</td>
<td class="auto-style7">
<asp:TextBox ID="TextBox7" runat="server"
TextMode="Number"></asp:TextBox>
</td>
<td class="auto-style5">
Page 2
ASP.NET
<asp:CustomValidator ID="CustomValidator1" runat="server"
ControlToValidate="TextBox7" ErrorMessage="Enter only 10 digit mobile number"
SetFocusOnError="True"></asp:CustomValidator>
</td>
</tr>
<tr>
<td class="auto-style2">
</td>
<td class="auto-style3">
<asp:Button ID="Button1" runat="server" Text="Register" />
</td>
<td class="auto-style7"> </td>
<td class="auto-style5"> </td>
</tr>
</table>
</div>
</form>
</body>
</html>
Page 3
ASP.NET
Default.aspsx.vb
Page 4
ASP.NET
Page 5
ASP.NET
3. Design a user interface to print the result student with total marks and percentage.
Subject 1
Subject 2
Subject 3
Total Marks
Percantage Calculate
Division Clear
Default.aspx
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<center>
<div>
</div>
</center>
</form>
</body>
</html>
Default.aspx.vb
TextBox1.Text = String.Empty
TextBox2.Text = String.Empty
TextBox3.Text = String.Empty
TextBox4.Text = String.Empty
TextBox5.Text = String.Empty
End Sub
Output
Page 7
ASP.NET
Page 8
ASP.NET
Default.aspx.vb
Output
Page 9
ASP.NET
Default.aspx
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
Student id:<asp:TextBox ID="txtid"
runat="server"></asp:TextBox>
<br />
<br />
student name:<asp:TextBox ID="txtname" runat="server"></asp:TextBox>
<br /><br />
student class<asp:TextBox ID="txtclass"
runat="server"></asp:TextBox>
<br /><br /><br /><br /><br />
<asp:GridView ID="GridView1"
runat="server">
</asp:GridView>
<br /><br />
<asp:Button ID="btninsert" runat="server" Text="insert"
/> &nb sp;
<asp:Button ID="btnupdate" runat="server" Text="update"
/> &nb
sp;
<asp:Button ID="btndelete" runat="server"Text="delete"
/>
</div>
</form>
</body>
</html>
Page 10
ASP.NET
Deafult.aspx.vb
Imports System.Data.SqlClient
Imports System.Data
sd.Fill(dt)
GridView1.DataSource = dt
GridView1.DataBind()
End Sub
Page 11
ASP.NET
Page 12