2011-05-05 76 views
0

我不知道爲什麼我的MaskedEditExtender1沒有發射..代碼中是否有任何問題?MaskedEditExtender1it沒有發射

</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> 


    &nbsp;<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

你是什麼意思,它不是射擊? – 2011-05-05 05:44:21

+0

它不工作的目標控制ID是txt手動 – 2011-05-05 05:45:42

+0

你有任何錯誤信息? – 2011-05-05 06:04:45

回答

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> 
+0

謝謝!我的問題是scriptmanager .. – 2011-05-05 06:20:04