0
votes

I used "calendar extender" by using some code but I am getting an error. I have included the Ajax-tollkit as well.

**Error Message:

Compiler Error Message: CS0012: The type 'System.Web.UI.ExtenderControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

**MY Code:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Article_edit.ascx.cs" Inherits="Controls_Article_edit" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 
<b>Date </b>&nbsp;
<asp:TextBox ID="Article_When" runat="server" Width="150"></asp:TextBox>
<cc1:CalendarExtender ID="ceCalendar" runat="server" PopupButtonID="ibtnCalendar" TargetControlID="Article_When">
</cc1:CalendarExtender>

I did the reference part and now i am facing the following error:

A ScriptManager is required on the page to use ASP.NET AJAX Script Components.

NOTE: When I include scriptManager control then compiler does not recognize it as valid control.

What I should do now ?

1
did you add a reference to the assembly System.Web.Extensions ? - BrokenGlass
you may add <asp:AjaxToolKit> .. hope it will help you. and ensure there is no other toolkit or script manager tag in your master page. thanks! - Nikhil G

1 Answers

0
votes

Add refernce of 'System.Web.Extensions to you project - Project rightclick -> Add References.