Databases Reference
In-Depth Information
DateTime
The
DateTime.ascx
field template is used in Read-only mode to display
DateTime
field
values. This field template contains a
Literal
control that injects the field value directly
into the web page without any adorning HTML elements. This template is nearly identical
to the
Text.ascx
template described in the following sections and could be removed,
making
Text.ascx
responsible for displaying
DateTime
field values in Read-only mode
as well.
DateTime_Edit
The
DateTime_Edit.ascx
field template is used for DateTime columns in Edit and
Insert mode. It contains a
TextBox
control, accompanied by a
CustomValidator
, used
to make sure that the value entered in the
TextBox
is a valid
DateTime
. It also contains
a
RequiredFieldValidator
, used to enforce values for columns marked with the
RequiredAttribute
, a
RegularExpressionValidator
, used to enforce regular expression
patterns for columns marked with the
RegularExpressionAttribute
and a
DynamicValidator
, used to enforce all other validation attributes applied to this column.
Decimal_Edit
The
Decimal_Edit.ascx
field template is used for
Decimal
,
Float
, and
Double
columns in
Edit and Insert mode. It contains a
TextBox
control, accompanied by a
CompareValidator
,
used to ensure that values entered in the
TextBox
are valid numbers. It also contains a
RequiredFieldValidator
, used to enforce values for columns marked with the
RequiredAttribute
; a
RangeValidator
, used to enforce range of values for columns
marked with the
RangeAttribute
; a
RegularExpressionValidator
, used to enforce regular
expression patterns for columns marked with the
RegularExpressionAttribute
; and a
DynamicValidator
, used to enforce all other validation attributes applied to this column.
EmailAddress
The
EmailAddress.ascx
field template is a read-only template used for
String
columns
marked with the
DataType(DataType.EmailAddress)
attribute. It includes a
HyperLink
control that displays the field value as a link with the URL scheme
“mailto:”
. When the
user clicks this link, most web browsers launch the default e-mail client installed on the
computer and create a new message with the field value automatically added in the “To”
list.
Enumeration
The
Enumeration.ascx
field template is used for enumeration columns in Read-only
mode. It contains a
Literal
control that displays the underlying integral field value
converted to its equivalent enumerated value and then converted to a
String
.