Click here to Skip to main content
15,923,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to attach a Ajax calendar control to a textbox. what i have done is as follows:
Added a textbox and attach a calendar pi at textbox. what i want is when user clicks on image automatically calendar popup with format of mm/dd/yyyy. I have downloaded AjaxControlToolkit and added its reference to my project.(.dd to my wesite bin folder).

this is what i have done with my textbox in .aspx:
XML
<asp:TextBox ID="TextBox2" AutoPostBack="true" onblur="calAge()" runat="server"></asp:TextBox>
                 <asp:Image ID="img" runat="server"
                   ImageUrl="~/stock-vector-post-it-calendar-113843446.jpg" Height="16px"
                   Width="16px" />
               <asp:CalendarExtender ID="TextBox2_CalendarExtender" runat="server"
                   Enabled="True" TargetControlID="TextBox2">
               </asp:CalendarExtender>


in my webconfig file:
XML
<pages>
            <controls>
                <add tagprefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add tagprefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit">
         tagPrefix="ajaxToolkit"/&gt;
            </add></controls>
        </pages>




when i debug my project it shows following error:
There is no source code available for the current location.

on clicking ok shows the error:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "AjaxControlToolkit.Properties.Resources.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed.
Why so? in my website namespace also i have added the using AjaxControlToolkit; . what went wrong? thanks in advance.
Posted
Comments
bbirajdar 27-Jun-13 5:53am    
Have you added the reference to the Ajax dll ?
Ankur\m/ 27-Jun-13 6:14am    
[moved from direct comment]
R_sharma - 16 mins ago
yes. i have added my reference to AjaxControlToolkit.dll .
bbirajdar 27-Jun-13 6:48am    
Then you must have copied the dll directly..In that case you miss the language resources and file that are added along with the assembly..Provide me the screen shot of your "refrences' folder, expanded
Ankur\m/ 27-Jun-13 7:42am    
Please see the reply above from aspnet -i for your comment. And please use 'Reply' link on the right side of a comment to reply it it. Clicking 'Have a Question or Comment?' do not notify the user and he may not ever know about your query.

Hi...
see this,its may useful to u.
1st step:http://www.youtube.com/watch?v=24IgoIc0Ons[^]
In 2nd step: Ajax Calendar Control[^] do like this.
OR
Add ajax control toolkit.dll to ur project reference folder.then write blow code in .aspx.
XML
<asp:textbox id="txtajax" runat="server" cssclass="txtajax" xmlns:asp="#unknown"></asp:textbox>        
<asp:image id="img1" runat="server" height="21px" imageurl="~/Koala.jpg" xmlns:asp="#unknown">
             Width="35px" />
<asp:toolkitscriptmanager id="tksm" runat="server"></asp:toolkitscriptmanager>   
<asp:calendarextender id="txtajax_CalendarExtender" runat="server" popupposition="Right" format="MM-yyyy" onclientshown="ChangeCalendarView" targetcontrolid="txtajax" popupbuttonid="img1"></asp:calendarextender>
</asp:image>


Thank u.
 
Share this answer
 
v3
Hi Sharma,
Please check this article its describing about Ajax Calender Control..
I think it will be helpful..
http://androidsharp.blogspot.in/2013/06/custom-calender-control-in-aspnet-web.html[^]
 
Share this answer
 
Instead of that try this following article:

Ajax Calendar Control[^]
 
Share this answer
 

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