locked
Ajax Controls RRS feed

  • Question

  • User-1664485818 posted
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    
        <asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtFittingDate" runat="server" />
    
    <asp:TextBox ID="txtFittingDate" runat="server" Width="80px"></asp:TextBox>
    


    Hi folks, I have Ajax controls on my tool bar, I’m using visual Studio 2012, when I tried to insert the calendar picker, at runtime I am presented with the following error;

    ‘Calendar Extender’ is not a know element

    Monday, November 17, 2014 8:23 AM

Answers

  • User-1716253493 posted
    You need to register it first like paindaasp said. In web.config or directly in the page. Before you register it, the control is unknown.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 17, 2014 9:22 AM
  • User2103319870 posted

    then typed the following code

    No This wont register your control property. Try adding the calendarExtender by Drag and Drop procedure like you did for scriptmanager

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 17, 2014 9:23 AM

All replies

  • User3690988 posted

    Is AjaxcontrolToolKit one of your References of your Solution?  Is it Registered on that page, something like:

    <%@ Register Assembly="AjaxControlToolkit, Version=4.1.60501.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
    
    

    Monday, November 17, 2014 8:51 AM
  • User-1664485818 posted

    Hi, no I don't seem to have that, I'm using a master page.

    Do I need to install Ajax even though I have Ajax tools on my tool bar?

    Monday, November 17, 2014 9:04 AM
  • User2103319870 posted

    Hi, no I don't seem to have that, I'm using a master page.

    How Did you add the control to your page. Did you copy paste if from some other location. If so then please try adding the control to your page by Drag and Drop from toolbox.

    This will ensure that controls are registered properly in your page

    Monday, November 17, 2014 9:06 AM
  • User-1664485818 posted

    I clicked and drag the Sriptmanager onto my page then typed the following code

     <asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtFittingDate" runat="server" />

     

     

       

    Monday, November 17, 2014 9:13 AM
  • User-1716253493 posted
    You need to register it first like paindaasp said. In web.config or directly in the page. Before you register it, the control is unknown.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 17, 2014 9:22 AM
  • User2103319870 posted

    then typed the following code

    No This wont register your control property. Try adding the calendarExtender by Drag and Drop procedure like you did for scriptmanager

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 17, 2014 9:23 AM
  • User-1664485818 posted

    Hi folks, I have managed to get the Ajax calendar working ok but now I have a new problem 'String was not recognized as a valid DateTime.’

    If I type the date in the textbox like so 17/11/2014 it work ok but if I select it from the Ajax calendar I receive the following error

    ‘String was not recognized as a valid DateTime’

    cmd.Parameters.Add("@FittingDate", SqlDbType.Date).Value = Convert.ToDateTime(txtFittingDate.Text);

    Monday, November 17, 2014 10:41 AM
  • User-760709272 posted

    Please keep threads limited to a single question, a new thread has been started for this one

    http://forums.asp.net/t/2019992.aspx?+String+was+not+recognized+as+a+valid+DateTime+error+in+Ajax+calendar

    Monday, November 17, 2014 10:48 AM