D
David C
I am trying to use the Ajax toolkit control MaskedEditExtender. I find that
when I use it on a control that already has a date in it the date goes away
in edit. Can I make it so that the date and time that is already bound
shows up in the mask? Below is what I am using in my GridView. Thanks.
David
<asp:TemplateField HeaderText="Start Time"
SortExpression="StartTime">
<EditItemTemplate>
<asp:TextBox ID="txtStartTime" runat="server"
Text='<%# Bind("StartTime") %>'></asp:TextBox>
<cc1:MaskedEditExtender ID="MaskedEditExtender1"
runat="server" AcceptAMPM="True"
TargetControlID="txtStartTime"
MaskType="DateTime" Mask="99/99/9999 99:99">
</cc1:MaskedEditExtender>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LblStartTime" runat="server"
Text='<%# Bind("StartTime", "{0:h:mm tt}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
when I use it on a control that already has a date in it the date goes away
in edit. Can I make it so that the date and time that is already bound
shows up in the mask? Below is what I am using in my GridView. Thanks.
David
<asp:TemplateField HeaderText="Start Time"
SortExpression="StartTime">
<EditItemTemplate>
<asp:TextBox ID="txtStartTime" runat="server"
Text='<%# Bind("StartTime") %>'></asp:TextBox>
<cc1:MaskedEditExtender ID="MaskedEditExtender1"
runat="server" AcceptAMPM="True"
TargetControlID="txtStartTime"
MaskType="DateTime" Mask="99/99/9999 99:99">
</cc1:MaskedEditExtender>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LblStartTime" runat="server"
Text='<%# Bind("StartTime", "{0:h:mm tt}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>