ASP.NET(vb.net) & Calendar - asp:Calendar - asp:Calendar : Displays a one-month calendar that allows the user to select dates and move to the next or previous month.
ShotDev Focus:
- ASP.NET(vb.net) & Calendar - asp:Calendar
Tag Control :
<asp:Calendar id="Calendar1" CellPadding="pixels" CellSpacing="pixels" DayNameFormat="FirstLetter|FirstTwoLetters|Full|Short" FirstDayOfWeek="Default|Monday|Tuesday|Wednesday| Thursday|Friday|Saturday|Sunday" NextMonthText="HTML text" NextPrevFormat="ShortMonth|FullMonth|CustomText" PrevMonthText="HTML text" SelectedDate="date" SelectionMode="None|Day|DayWeek|DayWeekMonth" SelectMonthText="HTML text" SelectWeekText="HTML text" ShowDayHeader="True|False" ShowGridLines="True|False" ShowNextPrevMonth="True|False" ShowTitle="True|False" TitleFormat="Month|MonthYear" TodaysDate="date" VisibleDate="date" OnDayRender="OnDayRenderMethod" OnSelectionChanged="OnSelectionChangedMethod" OnVisibleMonthChanged="OnVisibleMonthChangedMethod" runat="server"> <TodayDayStyle property="value"/> <DayHeaderStyle property="value"/> <DayStyle property="value"/> <NextPrevStyle property="value"/> <OtherMonthDayStyle property="value"/> <SelectedDayStyle property="value"/> <SelectorStyle property="value"/> <TitleStyle property="value"/> <TodayDayStyle property="value"/> <WeekendDayStyle property="value"/> </asp:Calendar>
Example
Calendar.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub Calendar1_OnSelectionChanged(sender as Object, e As EventArgs) Me.lblText1.Text = "Your selected : "& Me.Calendar1.SelectedDate.ToShortDateString End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <asp:Calendar id="Calendar1" runat="server" OnSelectionChanged="Calendar1_OnSelectionChanged"></asp:Calendar> <hr> <asp:Label id="lblText1" runat="server"></asp:Label> </form> </body> </html>
Screenshot