dba123
asked on
Type 'System.Web.UI.ScriptManager' is not defined
Ok, when trying to build, I get the error Type 'System.Web.UI.ScriptManag er' is not defined.
I had dragged a scriptmanager control from the toolbox\Ajax Extenstions section in my VS 2005 menu onto my ascx page at the top, right before the page Directive and before my first <table> tag.
Right now, Intellisense is complaining (red squiggly) in the designer file for thiis control about this line :
Global.System.Web.UI.Scrip tManager
and is giving me a suggestion to change it to System.Web.UI.ClientScript Manager but I don't know why, it makes no sense to me
I was told that I only need this line in my web.config after installing the ASP.NET runtime in order to gain full AJAX functionality
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Exten sions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
I now have the following ASP.NET AJAX-related sections including toolkit related AJAX stuff in my existing WAP project's web.config and have installed the ASP.NET AJAX Framework extensions (v1.0.61025)
....
<!-- ASP.NET AJAX Settings | Do not remove -->
<sectionGroup name="system.web.extension s" type="System.Web.Configura tion.Syste mWebExtens ionsSectio nGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35">
<sectionGroup name="scripting" type="System.Web.Configura tion.Scrip tingSectio nGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35">
<section name="scriptResourceHandle r" type="System.Web.Configura tion.Scrip tingScript ResourceHa ndlerSecti on, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35" requirePermission="false" allowDefinition="MachineTo Applicatio n"/>
<sectionGroup name="webServices" type="System.Web.Configura tion.Scrip tingWebSer vicesSecti onGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35">
<section name="jsonSerialization" type="System.Web.Configura tion.Scrip tingJsonSe rializatio nSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35" requirePermission="false" allowDefinition="Everywher e" />
<section name="profileService" type="System.Web.Configura tion.Scrip tingProfil eServiceSe ction, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35" requirePermission="false" allowDefinition="MachineTo Applicatio n" />
<section name="authenticationServic e" type="System.Web.Configura tion.Scrip tingAuthen ticationSe rviceSecti on, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35" requirePermission="false" allowDefinition="MachineTo Applicatio n" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
<!-- End ASP.NET AJAX Settings -->
...
<!-- ASP.NET AJAX Settings | Do not remove -->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Exten sions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
</controls>
</pages>
<compilation debug="false">
<assemblies>
<add assembly="System.Web.Exten sions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
</assemblies>
</compilation>
<!-- End ASP.NET AJAX Settings -->
<httpHandlers>
<!-- ASP.NET AJAX Settings | Do not remove -->
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Se rvices.Scr iptHandler Factory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Se rvices.Scr iptHandler Factory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers. ScriptReso urceHandle r, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35" validate="false"/>
<!-- End ASP.NET AJAX Settings -->
</httpHandlers>
<!-- ASP.NET AJAX Settings | Do not remove -->
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers. ScriptModu le, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
</httpModules>
<!-- End ASP.NET AJAX Settings -->
</system.web>
<!-- ASP.NET AJAX Settings | Do not remove -->
<system.web.extensions>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.Convert MeTypeConv erter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
-->
<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
writeAccessProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="prop ertyname1, propertyna me2"
writeAccessProperties="pro pertyname1 ,propertyn ame2" />
-->
</webServices>
<!--
<scriptResourceHandler enableCompression="true" enableCaching="true" />
-->
</scripting>
</system.web.extensions>
<system.webServer>
<validation validateIntegratedModeConf iguration= "false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMo de" type="System.Web.Handlers. ScriptModu le, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFac tory-Integ rated" />
<add name="ScriptHandlerFactory " verb="*" path="*.asmx" preCondition="integratedMo de"
type="System.Web.Script.Se rvices.Scr iptHandler Factory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
<add name="ScriptHandlerFactory AppService s" verb="*" path="*_AppService.axd" preCondition="integratedMo de"
type="System.Web.Script.Se rvices.Scr iptHandler Factory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
<add name="ScriptResource" preCondition="integratedMo de" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers. ScriptReso urceHandle r, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35" />
</handlers>
</system.webServer>
<!-- End ASP.NET AJAX Settings -->
</configuration>
So, back to my problem, why is the designer file complaining?
I also tried this link's resolution below, but with no luck...and I'm not using master pages in this project since a port from a WAP 1.1 project to the .NET 2.0 framework before i got here
http://mcosier.blogspot.com/2006/12/element-scriptmanager-is-not-known.html
I had dragged a scriptmanager control from the toolbox\Ajax Extenstions section in my VS 2005 menu onto my ascx page at the top, right before the page Directive and before my first <table> tag.
Right now, Intellisense is complaining (red squiggly) in the designer file for thiis control about this line :
Global.System.Web.UI.Scrip
and is giving me a suggestion to change it to System.Web.UI.ClientScript
I was told that I only need this line in my web.config after installing the ASP.NET runtime in order to gain full AJAX functionality
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Exten
I now have the following ASP.NET AJAX-related sections including toolkit related AJAX stuff in my existing WAP project's web.config and have installed the ASP.NET AJAX Framework extensions (v1.0.61025)
....
<!-- ASP.NET AJAX Settings | Do not remove -->
<sectionGroup name="system.web.extension
<sectionGroup name="scripting" type="System.Web.Configura
<section name="scriptResourceHandle
<sectionGroup name="webServices" type="System.Web.Configura
<section name="jsonSerialization" type="System.Web.Configura
<section name="profileService" type="System.Web.Configura
<section name="authenticationServic
</sectionGroup>
</sectionGroup>
</sectionGroup>
<!-- End ASP.NET AJAX Settings -->
...
<!-- ASP.NET AJAX Settings | Do not remove -->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Exten
</controls>
</pages>
<compilation debug="false">
<assemblies>
<add assembly="System.Web.Exten
</assemblies>
</compilation>
<!-- End ASP.NET AJAX Settings -->
<httpHandlers>
<!-- ASP.NET AJAX Settings | Do not remove -->
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Se
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Se
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.
<!-- End ASP.NET AJAX Settings -->
</httpHandlers>
<!-- ASP.NET AJAX Settings | Do not remove -->
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.
</httpModules>
<!-- End ASP.NET AJAX Settings -->
</system.web>
<!-- ASP.NET AJAX Settings | Do not remove -->
<system.web.extensions>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.Convert
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
-->
<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
writeAccessProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="prop
writeAccessProperties="pro
-->
</webServices>
<!--
<scriptResourceHandler enableCompression="true" enableCaching="true" />
-->
</scripting>
</system.web.extensions>
<system.webServer>
<validation validateIntegratedModeConf
<modules>
<add name="ScriptModule" preCondition="integratedMo
</modules>
<handlers>
<remove name="WebServiceHandlerFac
<add name="ScriptHandlerFactory
type="System.Web.Script.Se
<add name="ScriptHandlerFactory
type="System.Web.Script.Se
<add name="ScriptResource" preCondition="integratedMo
</handlers>
</system.webServer>
<!-- End ASP.NET AJAX Settings -->
</configuration>
So, back to my problem, why is the designer file complaining?
I also tried this link's resolution below, but with no luck...and I'm not using master pages in this project since a port from a WAP 1.1 project to the .NET 2.0 framework before i got here
http://mcosier.blogspot.com/2006/12/element-scriptmanager-is-not-known.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I will take your word this time that yours works but ultimately it was VS this time.
ASKER