Afternoon All,
I have spent a good chunk of my time on the internet tryiong to solve the below issue but im getting myself a little confused. I am new to .net and im working in VS 2010.
Im trying to get a simple calendar to work with an image and a text box. I have the AjaxControlToolkit.dll (Version 3.5). I the following error when trying to get this calender to work:
Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.
Here is my .aspx code (Which has a blue line right at the top of the page which states that there is a system.we.extensions error, but i already have this in my web config file?)
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></cc1:ToolkitScriptManager> <div> <asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="~/images/calendar.gif" AlternateText="Click here to display calendar" /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <cc1:calendarextender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1" PopupButtonID="ImageButton1"> </cc1:calendarextender> </div> </form> </body> </html> And here is my web config file:
<?xml version="1.0"?> <configuration> <appSettings/> <connectionStrings> <add name="TestConn" connectionString="Data Source=Server1;Initial Catalog=CatalogName;User ID=UserID;Password=Password" providerName="System.Data.SqlClient"/> </connectionStrings> <system.web> <compilation debug="true"> <assemblies> <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"></add> <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"></add> </assemblies> </compilation> <authentication mode="Windows"/> <customErrors mode="Off"/> <httpModules></httpModules> <pages> <controls> <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="cc1" /> <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"/> </controls> </pages> </system.web> </configuration> Many Thanks in advance.
Regards Betty