ASP.NET TodaysDate Property
Definition and Usage
The TodaysDate property is used to set or return the current date of the calendar.
If this property is not explicitly set, the date will be the server's date.
Example
The following example demonstrates how to output today's date:
<script language="VB" runat="server"> Sub Page_Load Response.Write("Today is: ") Response.Write(cal1.TodaysDate.ToShortDateString()) End Sub </script> <form runat="server"> <asp:Calendar id="cal1" runat="server" /> </form>
Example
- Return to the current date from the Calendar Control