0% found this document useful (0 votes)
93 views4 pages

Calendar App for Vacation Planning

Awd praxts
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views4 pages

Calendar App for Vacation Planning

Awd praxts
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Class: TYBSc IT Sem V

Roll No.: 22016 Advanced Web Development Date: 12.08.2024

b) Aim: Create a simple application to demonstrate your vacation


using calendar control.
Code:

[Link]
<%@ Page Language=”C#” AutoEventWireup=”true”
CodeBehind=”[Link]” Inherits=”calendar._Default” %>
<!DOCTYPE html>
<html xmlns=[Link]
<head id=”Head1” runat=”server”>
<title></title>
</head>
<body>
<form id=”form1” runat=”server”>
<div>
<asp:Calendar ID=”Calendar1” runat=”server”
OnSelectionChanged=”Calendar1_SelectionChanged”
OnDayRender=”Calendar1_DayRender”></asp:Calendar>
<asp:Calendar ID=”Calendar2” runat=”server”></asp:Calendar>
<br />
<asp:Label ID=”Label1” runat=”server” Text=”No of days is : “></asp:Label>
&nbsp;
<asp:Button ID=”Button1” runat=”server” OnClick=”Button1_Click”
Text=”Button” />
</div>
</form>
Class: TYBSc IT Sem V
Roll No.: 22016 Advanced Web Development Date: 12.08.2024

</body>
</html>

[Link]
Using System;
Using [Link];
Using [Link];
Using [Link];
Using [Link];
Using [Link];

Namespace calendar
{
Public partial class _Default : [Link]
{
Protected void Page_Load(object sender, EventArgs e)
{

}
Protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{

}
Class: TYBSc IT Sem V
Roll No.: 22016 Advanced Web Development Date: 12.08.2024

Protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)


{
If ([Link] == 15)
[Link](new LiteralControl(“</br>Independence Day”));
if (([Link] >= new DateTime(2024, 8, 1)) && ([Link] <= new
DateTime(2024, 8, 15)))
{
[Link] = [Link];
[Link] = [Link];
[Link] = new Unit(5);
if ([Link])
{
[Link]();
}
}
}
Protected void Button1_Click(object sender, EventArgs e)
{
TimeSpan t = [Link] – [Link];
[Link] += [Link]();
}
}
}
Class: TYBSc IT Sem V
Roll No.: 22016 Advanced Web Development Date: 12.08.2024

Output:

You might also like