Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Experiment No.

12
ASP code to calculate the number of days a person has lived on
basis of the Date of Birth.

Default.aspx:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"


Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Enter D.O.B:"></asp:Label>
<asp:TextBox ID="T1" runat="server"></asp:TextBox>

</div>
<p>
<asp:Button ID="Button1" runat="server" style="margin-bottom: 0px"
onclick="Button1_click" Text="Calculate" />
</p>
<p
&nbsp;My DOB:
<asp:Label ID="L2" runat="server" Text="L2"></asp:Label>
</p>
<p>
&nbsp;&nbsp;Today Date:
<asp:Label ID="L3" runat="server" Text="L3"></asp:Label>
</p>
<p>
&nbsp;&nbsp; No. Of Days Person Lived:
<asp:Label ID="L4" runat="server" Text="L4"></asp:Label>
</p>
</form>
</body>
</html>

Default.aspx.vb
XIIA_SHUBHAMYADAV_25 Page 1

You might also like