ASP.NET - CalendarExtender using ajax control

Asked By Revathi Murugesan
03-Feb-12 05:22 AM
Hi,

 I want to add ajax calendar control in my gridview. For that I have added code:

In Web.Config:

<pages>

<controls>

<add tagPrefix="ajax" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

<add tagPrefix="ajax" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

</controls>

</pages>

<httpHandlers>

<remove verb="*" path="*.asmx"/>

<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/>

</httpHandlers>


In aspx page:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<ajax:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">

</ajax:ToolkitScriptManager>


<ItemTemplate>

<asp:TextBox ID="txtAllocationstrtdt" Width="70px" Text='<%# Bind("ALLOC_START_DATE") %>' Visible='<%# IsInEditMode %>' runat="server" />

 

<ajax:CalendarExtender ID="ceCalendar" runat="server" PopupButtonID="ibtnCalendar"

TargetControlID="txtAllocationstrtdt">

</ajax:CalendarExtender>

 

<asp:ImageButton ID="ibtnCalendar" ImageUrl="../images/calendar.gif" Width="20px" runat="server" />

</ItemTemplate>

 


but while cliking calendar image i'm getting java script error 'sys' is undefined.

Please any one help me regard this.
  kalpana aparnathi replied to Revathi Murugesan
03-Feb-12 05:27 AM
hi,

Use this links for solution:
http://geekswithblogs.net/ranganh/archive/2007/07/15/113963.aspx%20%20http://geekswithblogs.net/lorint/archive/2007/03/28/110161.aspx
  Revathi Murugesan replied to kalpana aparnathi
03-Feb-12 05:46 AM
Hi that link is not getting opening....
  dipa ahuja replied to Revathi Murugesan
03-Feb-12 05:48 AM
If you want to open calender by clicking on the imagebutton try this simple code:
 
<script type="text/javascript">
  function InvokeCalender() {
    document.getElementById('ImageButton1').click();
  }
</script>
 
<asp:TextBox ID="TextBox1" runat="server" onFocus="InvokeCalender();"></asp:TextBox>
<cc1:CalendarExtender ID="TextBox1_CalendarExtender" runat="server" Enabled="True"
  PopupButtonID="ImageButton1" TargetControlID="TextBox1">
</cc1:CalendarExtender>
 
<asp:ImageButton ID="ImageButton1" runat="server" />
 

  kalpana aparnathi replied to Revathi Murugesan
03-Feb-12 05:51 AM
sorry for that another linked is posted to you


Thanks,
Create New Account
help
share session between Classic ASP applications and ASP.NET applications? I want to share session state between Classic ASP applications and ASP.NET applications. Can we share ? if yes , How ? Yes, it can. See the article at the user session, and can be used to identify session state for both classic ASP and ASP.NET. Session state information is stored in memory in ASP script and can't be shared with other applications, such as ASP.NET. If the session state is stored in a common format in Microsoft® SQL Server, the
using calender control in dropdownlist HI to all, I want to use calender control in dropdown list to select a date and store that date in sql server. . . can one help me with the code. . . using c#. . Hi, Here is a page using the calendar extender. I've placed a dropdownlist control and a html select below the associated textbox control. When I click on the link button to display the calendar it appears to render over top when I use IE 7 or FireFox 2. <%@ Page will help you Creating the CalendarControl UserControl Our mutual goal is to create an aggregate control that looks and acts like a dropdown calendar control. In case you are new to .NET or haven't explored the relationship between
datepickercontrol.aspx Ramesh, Please clear your question what you want to ask. hi ramesh DatePicker Control in ASP.Net Most often we will get a requirement to capture date input from the users. Normally friendly, if we provide a button next to the textbox which will pop up a calendar for the user to select a date, a datepicker control. This prevents the need to make the user type in a particular format and also this can be implemented in various ways. This article will help us to build this control ourselves and also some of the other options available. Moving forward, this article will help us to create DatePicker control in 3 ways, Ø Using ASP.Net Calendar control. Ø Using Calendar Extender control in AJAX Control Toolkit. Ø Using jQuery
Ajax calender extender Hi all I am trying to use Calender Extender. but I am facing at the page side. Untitled document Make sure you have added the dll and the ajax registration in Bin directory and the web.config file : 1. INSTALL ajaxtoolkit : steps http: / / bcahub.shareittips.com / ty-bca / asp-net / asp-theory / install-ajax-toolkit-in-visual-studio-net-2008 / 2. Add the ajaxtoolkit.dll in the BIN directory of your website 3. Add this in the web.config inside Controls node: < controls > < add tagPrefix = " cc1 " namespace = " System.Web.UI " assembly = " System.Web
Ajax not working Hi, Please any buddy let me know. I have take a default.aspx page having ajaxcontroltoolkit.dll and ajaxextensiontoolbox.dll. i am using calenderextender control & textbox control on it and i have assign all desired properties to calenderextender. But it not working that i can solve this problem. thanks alot. . Visit the sample page here http: / / www.asp.net / ajaxLibrary / AjaxControlToolkitSampleSite / Calendar / Calendar.aspx And check all the properties. 1.Did you check that only Calendar extender is not working or none of the Ajax is working ? Hi go to web