Hi Oledormann,
Please make your ImageButton associated with CalendarExtender's PopupButtonID property. Otherwise , it will make a post back.
<asp:ImageButton CausesValidation="false" ID="btnCalendar1" runat="server" ImageUrl="~/pic/expand.jpg" />
<ajaxToolkit:CalendarExtender BehaviorID="fromCal" Format="yyyy-MM-dd" ID="CalendarExtender3"
runat="server" TargetControlID="txtFromDate"PopupButtonID="btnCalendar1">
If it doesn't work , please feel free to let me know.
I hope this help.
Best regards,
Jonathan
I have tried that, but when the calendar + button is in an IFrame the button makes a postback and the calendar won′t popup...
I have testet the AJAX Toolkit controls in an IFrame, and many of them won′t work - especially in IE
Hi Oledormann,
Where's your ScriptManager? You can put it inside the master page or inside the ContentPlaceHolder. Here is my sample.
Aspx:
<%@. Page Language="C#" AutoEventWireup="true" MasterPageFile="~/WebMaster.master" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"><%=DateTime.Now.ToString()%><asp:TextBox CssClass="forms" Width="70px" ID="txtFromDate" runat="server"></asp:TextBox><asp:ImageButton CausesValidation="false" ID="btnCalendar1" runat="server" ImageUrl="~/pic/collapse.jpg" /> <ajaxToolkit:CalendarExtender BehaviorID="fromCal" Format="yyyy-MM-dd" ID="CalendarExtender3" runat="server" TargetControlID="txtFromDate"PopupButtonID="btnCalendar1"></ajaxToolkit:CalendarExtender> </asp:Content>
master page:
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
</form>
My environments are: Asp.Net 2.0 Ajax Extensions V1.0 + Ajax Control Toolkit V10618 +VS2005 +IE6/7.
I hope this help.
Best regards,
Jonathan
Hello
My question is how do I set the date for the calenderextender control
Say in case i have to set the min date of the calendar control to todays date or say some other date
is it possible?
Do reply
Hi Ravi2345,
As far as I know, CalenderExtender has no such property or function to support your intent. But you can use a CompareValidator.
Hope this help.
Best regards,
Jonathan
Hi
I'm having the same problem my Calendar Control in iFrame doesn't work. When I run the page directly without iframe it works perfectly but in iframe onclick of image button page gets postback.
here is my code. my script manager is in iframe.
<asp:TextBoxID="T1"runat="server"MaxLength="10"Width="100px"></asp:TextBox>
<asp:ImageButtonID="Cal1Img"runat="server"ImageUrl="~/images/calendar.gif"AlternateText="Click to show calendar"/><cc1:CalendarExtenderID="CalendarExtender1"runat="server"PopupButtonID="Cal1Img"TargetControlID="T1">
</cc1:CalendarExtender>
please help me ..
Thanks
Imran Ashraf
No comments:
Post a Comment