Click here to Skip to main content
15,885,949 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friend i am just start in ajax but i am not able to show calender when i am click on textbox plz guide me
i am using this code on my page.
<asp:TextBox ID="txtDate" runat="server" Width="70">
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtDate" OnClientShown="txtDate" PopupButtonID="txtDate">
Posted

XML
/* First Of all Include ToolKit Script Manager */
 <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
 </asp:ToolkitScriptManager>
/* Text Box To take Value From Calendor Extendor
  <asp:TextBox ID="txtDateFrom" runat="server"></asp:TextBox>
/* Image Button on click of which You want to pop Calendor
<asp:ImageButton ID="btnDate2" runat="server" ImageUrl="~/Admin/Images/CalendorIcon.jpg" Width="4%" />
/* Last Your Calendor Extendor
<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtDateFrom"  PopupButtonID="btnDate2" runat="server">
</asp:CalendarExtender>


/* For Additional Details Try this Link */

Ajax Controls Samples and Examples [^]
 
Share this answer
 
Comments
guptaadeepak 29-Jul-11 7:37am    
i am trying but not able to view calendar
Beside the answer given by Mohd Wasif, Why don't you try jQuery UI Date picker[^]? It is quite easy to use in ASP.Net
 
Share this answer
 
its very simple to create
follow this code your easily get the answer

XML
/* First Of all Include ToolKit Script Manager */
 <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
 </asp:ToolkitScriptManager>
/* Text Box To take Value From Calendor Extendor
  <asp:TextBox ID="txtDateFrom" runat="server"></asp:TextBox>
/* Image Button on click of which You want to pop Calendor
<asp:ImageButton ID="btnDate2" runat="server" ImageUrl="~/Admin/Images/CalendorIcon.jpg" Width="4%" />
/* Last Your Calendor Extendor
<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtDateFrom"  PopupButtonID="btnDate2" runat="server">
</asp:CalendarExtender>
 
Share this answer
 
XML
<asp:TextBox ID="txtactualDOB" runat="server"></asp:TextBox>
  <cc1:CalendarExtender ID="txtactualDOB_CalendarExtender" runat="server" Format="dd/MM/yyyy"
      Enabled="True" TargetControlID="txtactualDOB">
  </cc1:CalendarExtender>



and make sure You gave taken script manager in your page and attached ajaxdll in your project.
 
Share this answer
 
v2
Comments
guptaadeepak 29-Jul-11 7:28am    
wasif when i am drag and drop the calendarExtender its not like your code its not show <ccl:> and it <asp:> what will i do??
Wonde Tadesse 29-Jul-11 7:32am    
5+
uspatel 29-Jul-11 8:10am    
5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900