Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7863579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:31:45+00:00 2026-06-02T23:31:45+00:00

I am using ajax calender extender on my website. <table border=0 cellpadding=0 cellspacing=0> <tr>

  • 0

I am using ajax calender extender on my website.

 <table border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>Active From: <asp:TextBox ID="inputActiveFromDate" runat="server"></asp:TextBox> 
                                                <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="inputActiveFromDate" PopupButtonID="btn_Calendar1"   Format="dd/MM/yyyy 00:00:00"></cc1:CalendarExtender>
                                                <asp:ImageButton runat="server" ID="btn_Calendar1" ImageUrl="../images/buttons/Lock_icon.gif" />
                                            </td>
                                            <td width="20"></td>
                                            <td>Active Until: <asp:TextBox ID="inputActiveUntilDate" runat="server"></asp:TextBox>
                                                <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="inputActiveUntilDate"  PopupButtonID="btn_Calendar2"  Format="dd/MM/yyyy 23:59:59"></cc1:CalendarExtender>
                                                <asp:ImageButton runat="server" ID="btn_Calendar2" ImageUrl="../images/buttons/Lock_icon.gif" />
                                            </td>
                                        </tr>
                    </table>

everything is working fine, but i am getting this error on all the browsers.

> Unable to set value of the property 'PopupBehavior': object is null or
> undefined

please help me to solve

Error comes at

// Name:        MicrosoftAjax.debug.js
// Assembly:    AjaxControlToolkit
// Version:     4.1.50508.0
// FileVersion: 4.1.50508
// (c) 2010 CodePlex Foundation

initialize: function Behavior$initialize() {
        Sys.UI.Behavior.callBaseMethod(this, 'initialize');
        var name = this.get_name();
        if (name) this._element[name] = this;// error place <---
    },

MY CS CODE:

using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["DBConn"].ToString())){

String  sql = "INSERT INTO tablename (SDate,EDate) VALUES ('" + Convert.ToDateTime(inputActiveFromDate.Text) + "','" + Convert.ToDateTime(inputActiveUntilDate.Text) + "'); SELECT  @@IDENTITY;";conn.Open();
                    SqlCommand comm = new SqlCommand(sql, conn);    
                    comm.ExecuteNonQuery();
                   // int lastId = Convert.ToInt32(comm.ExecuteScalar());
                    conn.Close();




                }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:31:46+00:00Added an answer on June 2, 2026 at 11:31 pm

    I believe the issue is because of you are using the PopupButtonID option and passing in the textbox id

    You either need to remove this option or pass in an id of an actual button

    <asp:TextBox ID="inputActiveUntilDate" runat="server"></asp:TextBox>
    <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="inputActiveUntilDate" Format="dd/MM/yyyy 23:59:59"></cc1:CalendarExtender>
    

    OR

    <asp:TextBox ID="inputActiveUntilDate" runat="server"></asp:TextBox>
    <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="inputActiveUntilDate" PopupButtonID="btn_Calendar" Format="dd/MM/yyyy 23:59:59"></cc1:CalendarExtender>
    <asp:ImageButton runat="server" ID="btn_Calendar" ImageUrl="PathToACalendarButton" />
    

    Edit:

    I dont know much about sql injection risks, but it seems to me that it could be definitely be possible in your code. You may want to think about using parameterized queries such as stored procedures.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ASP.NET AJAX Calender and a TextBox. I want the user should
I am using MS AJAX ASP.NET Components (Calendar Extender) and I'm finding this problem.
I'm using the Ajax control toolkit calendar extender on a textbox with a submit
I am using MS AJAX ASP.NET Component (Calendar Extender) and i used some css
I have an ASP.NET user control that contains a textbox which has an AJAX
I'm interested in using an AJAX extension, namely this textbox calendar control. Has anyone
When using AJAX, I tend to pass objects from my server to Javascript in
I'm creating an ASP.NET application (.NET 2.0) with C# and I'm using the AJAX
I am using asp.net calendar with ajax extension in my project. I want to
I am using Ajax tab container control with 3 tabs. I have placed a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.