Latest web development tutorials

ASP.NET Calendar TodaysDate property

Calendar Control Calendar Control

Definition and Usage

TodaysDate property sets or returns the current calendar date.

If the property is not set, the date will be the date on the server.


Examples

The following example shows the output of 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>

The demonstration >>

Calendar Control Calendar Control