Gets or sets a pre-packaged date format.
One of the DateFormat enumeration values. The default is Default.
| Date Format | Description |
|---|---|
| Default | Date format = "d-MMM-yyy"; Display = 20-Feb-2005. |
| LongDate | Uses Culture.DateTimeFormat.LongDatePattern. Example ("en-US"): Date format = "MMMM d, yyyy"; Output = February 20, 2005. |
| ShortDate | Uses Culture.DateTimeFormat.ShortDatePattern. Example ("en-US"): Date format = "M/d/yyyy"; Output = 2/20/2005. |
[Visual Basic, C#] The following example demonstrates how to use the DateFormat property to display the date in the culture dependent ShortDatePattern.
[Visual Basic]
<%@ Page Language="VB" AutoEventWireup="True" %>
<%@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
<head>
<title>BDP Lite DateFormat Example</title>
<style>
</head>
<body>
<form id="Form1" runat="server">
<h3>BDP Lite DateFormat Example</h3>
<BDP:bdplite
id="BDPLite1"
runat="server"
DateFormat="ShortDate">
</BDP:bdplite>
</form>
</body>
</html>
[C#]
<%@ Page Language="C#" AutoEventWireup="True" %>
<%@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
<head>
<title>BDP Lite DateFormat Example</title>
</head>
<body>
<form id="Form1" runat="server">
<h3>BDP Lite DateFormat Example</h3>
<BDP:bdplite
id="BDPLite1"
runat="server"
DateFormat="ShortDate">
</BDP:bdplite>
</form>
</body>
</html>
BDPLite Class | BasicFrame.WebControls Namespace