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

<%@ Page Language="vb" debug="true" Inherits="Validation.

WebForm1" %>

<script runat="server">
Protected Sub Page_Load(sender As Object, e As EventArgs)
Label2.Text = "Today's date is " & " " & Today()

End Sub

Sub calselectchange (ByVal sender As Object, ByVal e As EventArgs)


Label4.Text = "New Selected Date is " & " " & Calendarl.SelectedDate

End Sub

Sub calmonthchange (ByVal sender As Object, ByVal e As MonthChangedEventArgs)


Label3.Text = "Month changed from" & " " & e.PreviousDate.Month & " - " &
e.NewDate.Month

End Sub

</script>

<html>
<head runat="server">
<title>Calendar Control</title>
</head>
<body>

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


<div style="margin-left: 25px; margin-top: 50px;">

<asp:Label ID="Label1" runat="server" BackColor="PowderBlue" BorderColor="#660033"


BorderStyle="Double"
Height="61px" Text="Calendar Control" width="280px" Font-Bold="True" Font-
Names="Trebuchet MS" Font-Size="16pt" Font-Underline="True"></asp:Label>

<asp:Calendar ID="Calendarl" runat="server" OnSelectionChanged="calselectchange"


OnvisibleMonthChanged="calmonthchange" SelectionMode="DayWeekMonth"
Width="280px">
<DayHeaderStyle BorderStyle="Solid" />
<SelectedDayStyle BorderStyle="Double" />
</asp:Calendar>

<asp:Label ID="Label2" runat="server" Font-Names="Trebuchet MS"


Backcolor="powderblue" BorderColor="#660033" BorderStyle="Double"
Height="42px" width="280px"></asp:Label>
<br />
<br />
<asp:Label ID="Label3" runat="server" Font-Names="Trebuchet MS"
BackColor="powderblue" BorderColor="#660033" BorderStyle="Double"
Height="42px" width="280px"></asp:Label>
<br />
<br />
<asp:Label ID="Label4" runat="server" Font-Names="Trebuchet MS"
BackColor="powderblue" BorderColor="#660033" BorderStyle="Double"
Height="42px" width="280px"></asp:Label>

<br />
</div>
</form>
</body>
</html>

You might also like