AJAX CalendarExtender无法正常工作

时间:2014-06-26 11:57:25

标签: ajax visual-studio-2010

我正在开发visual studio 2010,我想在文本框中使用ajax Calendar但是它没有任何想法吗?

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<span>Request Date:</span>
<span style="font-size: 8pt; font-family: Arial, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span style="font-family: Arial, sans-serif;"><o:p></o:p>
  <span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(46,116, 181);">
    <span style="font-size: 8pt; font-family: Arial, sans-serif;">
     <span style="font-size: 9pt; font-family: Arial, sans-serif;">
       <b><span style="font-size: 8pt;   font-family: Arial, sans-serif">   
         <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"  EnableScriptGlobalization="true" EnableScriptLocalization="true" ScriptMode="Debug"   CombineScripts="false"></ajaxToolkit:ToolkitScriptManager> 
         <asp:TextBox ID="txtReqDate" runat="server"></asp:TextBox>
         <ajaxtoolkit:CalendarExtender ID="CalendarExtender2" runat="server" PopupPosition="Right" PopupButtonID="txtReqDate" TargetControlID="txtReqDate" Format="dddd, MMMM dd, yyyy"> </ajaxtoolkit:CalendarExtender>
       </span></b>
     </span>
    </span>
  </span>
</span>

1 个答案:

答案 0 :(得分:0)

<asp:ImageButton ID="imgExpiry" runat="server" CausesValidation="False" ImageUrl="yourumage.png"
                                            ToolTip="Please select news expire date!"></asp:ImageButton>

<ajaxtoolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtReqDate"
                                            PopupButtonID="imgExpiry" Format="dd/MM/yyyy" Enabled="True">
                                        </ajaxtoolkit:CalendarExtender>

按上述方式使用