Link to home
Start Free TrialLog in
Avatar of dba123
dba123

asked on

Type 'System.Web.UI.ScriptManager' is not defined

Ok, when trying to build, I get the error Type 'System.Web.UI.ScriptManager' 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.ScriptManager

and is giving me a suggestion to change it to System.Web.UI.ClientScriptManager 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.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 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.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
                  <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
                        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
                        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
                              <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
                              <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
                              <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
                        </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.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                  </controls>
            </pages>
            <compilation debug="false">
                  <assemblies>
                        <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                  </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.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                  <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                  <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
                  <!-- End ASP.NET AJAX Settings -->
            </httpHandlers>
 
            <!-- ASP.NET AJAX Settings | Do not remove -->
            <httpModules>
                  <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            </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.ConvertMeTypeConverter"/>
                              </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="propertyname1,propertyname2"
                      writeAccessProperties="propertyname1,propertyname2" />
                              -->
                  </webServices>
                  <!--
                              <scriptResourceHandler enableCompression="true" enableCaching="true" />
                        -->
            </scripting>
      </system.web.extensions>
 
      <system.webServer>
            <validation validateIntegratedModeConfiguration="false"/>
            <modules>
                  <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            </modules>
            <handlers>
                  <remove name="WebServiceHandlerFactory-Integrated" />
                  <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
                         type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                  <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
                         type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                  <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            </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
Avatar of Neotk
Neotk
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dba123
dba123

ASKER

you know what, I simply closed out VS and reopened it....problem gone!
Avatar of dba123

ASKER

I will take your word this time that yours works but ultimately it was VS this time.