我不知道为什么我的MaskedEditExtender1没有被解雇..代码中是否有任何问题?
</asp:ScriptManager>
<div>Enter a New Insurance Carrier Code<asp:Panel ID="Panel1" runat="server"
Height="105px" Width="141px">
<asp:radiobuttonlist id="Radiobuttonlist1" runat="server" Height="83px"
onselectedindexchanged="Radiobuttonlist1_SelectedIndexChanged" Width="139px">
<asp:listitem id="optAutoAssign" runat="server" Selected = "true" value="Auto Assign" />
<asp:listitem id="optManual" runat="server" value="Manual" />
</asp:radiobuttonlist>
<asp:TextBox ID="txtManual" runat="server"></asp:TextBox>
<ajaxToolkit:MaskedEditExtender
ID="MaskedEditExtender1" runat="server"
TargetControlID="txtManual"
Mask="99:99:99"
MessageValidatorTip="true"
OnFocusCssClass="MaskedEditFocus"
OnInvalidCssClass="MaskedEditError"
MaskType="Time"
AcceptAMPM="True"
ErrorTooltipEnabled="True">
</ajaxToolkit:MaskedEditExtender>
答案 0 :(得分:1)
以下是我正在使用的脚本,它运行正常:
<asp:TextBox ID="fromTimeTextBox" runat="server"></asp:TextBox>
<asp:MaskedEditExtender ID="timeMaskedEditExtender" runat="server"
AcceptAMPM="true" Mask="99:99" MaskType="Time"
TargetControlID="timeTextBox"/>
确保您已注册 AJAXToolKit 程序集:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="asp" %>
并使用ToolkitScriptManager
:
<asp:ToolkitScriptManager ID="toolkitScriptManager" runat="server">
</asp:ToolkitScriptManager>