`
wangdeshui
  • 浏览: 253406 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
阅读更多

为什么要在vs2008下开发ASP.Net2.0 and AJAX1.0的程序,因为vs2008提供了很多新的特性,比如WYSIWYG design surface, CSS management features, Jscript Intellisense, and Jscript debugging 有关这些的介绍你可以到soctte的博客浏览

1. 下载vs2008的Team suite或者professional,区别就是你搞不搞团队开发,如果你想变成正版,安装完毕后,在安装和删除程序点击卸载,他会让你输入序列号,输入下面的序列号PYHYP WXB3B B2CCM V9DX9 VDY8T,点击更新就可以了。

2. 安装ASP.NET AJAX Extensions 1.0,下载地址(http://www.asp.net/ajax/downloads/).

3. 添加引用到vs2008,在工具栏上新建一个ASP.NET AJAX1.0 的Tab,在这个Tab下右击--choose items,选择C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\System.Web.Extensions.dll,这是工具栏中就会出现asp.net ajax1.0的工具,如scriptmanager, updatepanel 等等。

image

(一)新的项目

到这里http://www.asp.net/ajax/downloads/(http://go.microsoft.com/fwlink/?LinkId=106273 )下载ASP.NET 2.0 AJAX Templates for VS2008安装

image

(2)打开vs2008,File--New Project--选择.Net Framework2.0--选择AJAX1.0-Enabled ASP.NET2.0 WEB Application--OK. 系统就帮你自动配置好了web.config

(二)已有项目

新进一个Vs2008的空的解决方案,把已有的项目加进去,添加时,如果是class libary我们直接升级即可,然后再Project 属性里Target Framework选择.NET Framework2.0即可

image

添加web工程时,系统提示我们升级到.net3.5时,我们选择否即可。

image

注意,如果我没系统用了ASP.NET AJAX1.0 的东西,我们运行时会出错,其实我们只需要改一下WEB.config就可以了。完整的ASP.NET AJAX1.0 Web.config 如下


<!---->
ASP.NET AJAX1.0 WEB.config
<!----><?xml version="1.0"?>
<configuration>
  
<configSections>
    
<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>
  
</configSections>

  
<system.web>
    
<pages>
      
<controls>
        
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      
</controls>
    
</pages>
    
<!--
          Set compilation debug="true" to insert debugging
          symbols into the compiled page. Because this
          affects performance, set this value to true only
          during development.
    
-->
    
<compilation debug="false">
      
<assemblies>
        
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      
</assemblies>
    
</compilation>

    
<httpHandlers>
      
<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"/>
    
</httpHandlers>

    
<httpModules>
      
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    
</httpModules>
  
</system.web>

  
<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>
</configuration>

但我们只需要把下面的几项加入我们现有的web.config即可

(1)拷贝下面的代码到<configuration>下

Code
<!---->  <configSections>
        
<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>
    
</configSections>


(2)把下面的代码放入<system.web><pages><controls>节。

<!---->
Code
<!----><add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

(3)把其他几节修改为如下的模样


<!---->
Code
<!----> <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" />
            
<add name="ASBXHandler" verb="GET,HEAD,POST" path="*.asbx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        
</handlers>
    
</system.webServer>

(4)如果你的web.config里还有你自己的配置,请添加进去。

 

至此,你就可以用VS2008的开发环境了。

分享到:
评论

相关推荐

    Microsoft ASP.NET 2.0 AJAX Extensions 1.0.zip

    主要用来解决:Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies....

    Microsoft ASP.NET 2.0 AJAX Extensions 1.0

    **ASP.NET 2.0 AJAX Extensions 1.0** ...总之,ASP.NET 2.0 AJAX Extensions 1.0是提升ASP.NET 2.0应用现代感和用户体验的关键工具,它简化了开发复杂交互功能的过程,但同时也需要开发者在性能和复杂性之间找到平衡。

    ASP.NET2.0 AJAX开发组件包

    Validators.zip是在Bet1a,Beta2,RC中自带但在Relase中被移到ASP.NET 2.0补丁包中的AJAX兼容性Validators控件库,在新的ASP.NET2.0补丁包安装之前可以先用此库代替。具体用法祥见Scott老大的Blog ...

    asp.net 2.0动态网站开发教程

    ASP.NET 2.0是微软公司推出的一种用于构建Web应用程序的框架,它是.NET Framework的一部分,为开发者提供了丰富的功能和工具,使得创建动态、交互式的Web站点变得更加容易。本教程将深入探讨ASP.NET 2.0的核心特性,...

    ASP.net 2.0网络编程从入门到精通-修订.rar

    ASP.NET 2.0是微软开发的一个用于构建Web应用程序的框架,它建立在.NET Framework的基础之上,为开发者提供了丰富的功能和高效的语言支持。本资源"ASP.NET 2.0网络编程从入门到精通-修订"显然是一个教程文档,旨在...

    Programming Microsoft ASP.NET 2.0 Applications - Advanced Topics

    《Programming Microsoft ASP.NET 2.0 Applications - Advanced Topics》是一本深入探讨ASP.NET 2.0高级应用开发的专业书籍。本书旨在帮助开发者充分利用ASP.NET 2.0的强大功能,实现高效、可扩展和高度定制化的Web...

    ComponentArt Web.UI 2008.1 for ASP.NET 2.0 完美无限制DLL文件

    该版本有四个框架平台:ASP.NET 1.0、ASP.NET 2.0、ASP.NET Ajax,还有当然是最新的.NET框架支持的ASP.NET 3.5了。 &lt;br&gt;2008.1不仅对其代码的运行效率进行了优化,还最增了一个大家期盼已久的成员:Upload。上传...

    asp.net2.0入门经典

    《ASP.NET 2.0 入门经典》是一本针对初学者的.NET框架下的Web开发指南,由浅入深地介绍了ASP.NET 2.0的关键技术和应用方法。这本书是许多.NET初学者在学习过程中被老师推荐的重要参考资料,因为它涵盖了Web开发的多...

    asp.net2.0+Access数据库网站开发祥例

    《ASP.NET 2.0 + Access 数据库网站开发详例》是针对初学者和有一定基础的开发者设计的一份宝贵资源,旨在深入浅出地讲解如何使用ASP.NET 2.0框架,结合C#编程语言以及Access数据库来构建完整的网站应用程序。...

    asp.net2.0基础教程

    ASP.NET 2.0是微软开发的一个用于构建Web应用程序的框架,它基于.NET Framework,提供了丰富的功能和便捷的开发环境。这个基础教程针对初学者,旨在深入浅出地讲解ASP.NET 2.0的核心概念和技术。 1. **ASP.NET 2.0...

    ASP.NET 2.0网络开发技术

    ASP.NET 2.0是微软公司推出的一种基于.NET Framework的Web应用程序开发平台,它极大地简化了Web应用的构建过程,并提供了丰富的功能集,为开发者带来了高效、强大的开发体验。本教程将深入探讨ASP.NET 2.0的核心概念...

    解决了GB2312乱码问题的ASP.NET 2.0 AJAX Control Tookit 1.0.10618

    对应的文章见 《在ASP.NET AJAX Control Toolkit 1.0.10618中使用GB2312的编码时出现乱码的两种解决方案》 http://blog.csdn.net/fancyf/archive/2007/08/21/1753404.aspx&lt;br&gt;这个修改基于官方的1.0.10618,只...

    ASP.NET 2.0(PDF版)

    ASP.NET 2.0是微软开发的一个Web应用程序框架,它基于.NET Framework,为开发者提供了构建动态网站、Web应用和服务的强大工具。此PDF版教程专为初学者设计,旨在帮助新手快速掌握ASP.NET 2.0的核心概念和技术。 一...

    ASP.NET 2.0 AJAX Hands-On Lab

    ASP.NET AJAX 是微软为提高网页应用程序性能而开发的一套工具和技术集合。通过集成浏览器独立的客户端脚本库与ASP.NET 2.0开发框架,开发者可以轻松地创建具有吸引人且交互性界面的强大网页应用。 #### 目标 本实验...

    征服ASP.NET 2.0 Ajax——Web开发技术详解(光盘使用说明)

    根据提供的信息,《征服ASP.NET 2.0 Ajax——Web开发技术详解》这本书旨在全面介绍如何利用ASP.NET 2.0结合Ajax进行高效、现代化的Web开发。书中通过丰富的示例来帮助读者掌握这一领域的关键技术。 ##### 运行环境 ...

    asp.net2.0论坛源码

    通过分析和研究"asp.net2.0论坛源码",开发者不仅能掌握ASP.NET 2.0的基本用法,还能了解到如何设计和实现一个完整的Web应用,包括数据库交互、用户认证、页面跳转、数据绑定等多个方面。这将有助于提升实际项目开发...

    ASP.NET 2.0快速入门(1)

    虽然ASP.NET 2.0本身并未内置AJAX支持,但微软后来发布了ASP.NET AJAX Toolkit,它提供了一系列控件和服务端库,便于开发富客户端应用程序。 通过本教程,初学者将学习如何创建ASP.NET 2.0 Web应用程序,理解其...

    ASP.NET 2.0 源代码

    10. **ASP.NET AJAX (Atlas)**:虽然ASP.NET 2.0本身并不包含完整的AJAX支持,但引入了Atlas框架的预览版,为后续的ASP.NET AJAX 1.0奠定了基础。 在你拥有的"ASP.NET 2.0"源代码中,可能包含了这些特性在实际项目...

Global site tag (gtag.js) - Google Analytics