2017-07-08 5 views
0

カレンダーを使用して日付を挿入しようとしています。残念ながら、複数のカレンダーを使用する必要があります。カレンダーから日付を抽出するために、私は私が複数の <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" EnableScriptGlobalization="true" EnableScriptLocalization="true" runat="server"> </cc1:ToolkitScriptManager> を追加するたびにだから私のプログラムがエラーを示したAjaxツールキット1つのページで複数のajaxカレンダーを使用する方法

`<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" EnableScriptGlobalization="true" EnableScriptLocalization="true" runat="server"> 
      </cc1:ToolkitScriptManager> 

<asp:TextBox ID="DateOfPurchase" runat="server" Height="30px" ReadOnly="true" Width="262px"></asp:TextBox> 

      <asp:ImageButton ID="imgPopup" ImageUrl="images/index.jpg" ImageAlign="Bottom" 
      runat="server" Height="27px" Width="37px" /> 

      <cc1:CalendarExtender ID="Calendar1" PopupButtonID="imgPopup" runat="server" TargetControlID="DateOfPurchase" 
      Format="dd/MM/yyyy"> 
      </cc1:CalendarExtender>` 

を使用しています。 1つのToolkitScriptManagerと複数のAjaxカレンダーコントロールを使用する場合、カレンダーを表示するための1つのイメージボタンをクリックすると、そのページのすべてのカレンダーがポップアップします。

答えて

1

各CalendarExtenderは、独自のID

 <asp:ImageButton ID="imgPopup1" ImageUrl="images/index.jpg" ImageAlign="Bottom" 
     runat="server" Height="27px" Width="37px" /> 

     <cc1:CalendarExtender ID="Calendar1" PopupButtonID="imgPopup1" runat="server" TargetControlID="DateOfPurchase1" 
     Format="dd/MM/yyyy"> 
     </cc1:CalendarExtender>` 

 <asp:ImageButton ID="imgPopup2" ImageUrl="images/index.jpg" ImageAlign="Bottom" 
     runat="server" Height="27px" Width="37px" /> 

     <cc1:CalendarExtender ID="Calendar2" PopupButtonID="imgPopup2" runat="server" TargetControlID="DateOfPurchase2" 
     Format="dd/MM/yyyy"> 
     </cc1:CalendarExtender>` 
+0

おかげで多くを持っていなければなりません!!。出来た。 – saurabh

関連する問題