2012-02-14 42 views
0
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
<asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server" 
     ClearTime="True" Enabled="True" TargetControlID="TextBox1"> 
    </asp:CalendarExtender> 

上面的代碼在我輸入文本框中的值時不彈出日曆。前一段時間我和Ajax一起工作過,並且工作正常。我錯過了什麼?我做錯了什麼? Ajax日曆ASP.NET

我正在使用Visual Studio 2008和Ajax庫3.5。其他Ajax控件(如Edit)工作正常。

哦,我花了兩個+小時在這是很容易的事情。

+0

我想你可能需要更新面板... – 2012-02-14 20:24:56

回答

0

顯然,我的問題是腳本管理線

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 

更改爲

<ajaxToolkit:ToolkitScriptManager runat="Server" EnableScriptGlobalization="true" 
     EnableScriptLocalization="true" ID="ScriptManager1" ScriptMode="Debug" CombineScripts="false" /> 

,一切工作正常。

0

對於CalenderExtender使用cc1,如下所示。

<cc1:CalendarExtender ID="TextBox1_CalendarExtender" runat="server" ClearTime="True" Enabled="True" TargetControlID="TextBox1"> 
</cc1:CalendarExtender> 
+0

沒有工作。控制ID照顧它順便說一句。 – 2012-02-14 21:04:21

+0

我更新了我的帖子。請嘗試新的。 – RuudVanNistelrooy 2012-02-15 09:51:44

+0

找到了我的解決方案。 – 2012-02-16 18:39:41