转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 站长学院 >> Web开发 >> 正文
ASP.NET 从Beta1 升级到 Beta2 的新变化         ★★★★

ASP.NET 从Beta1 升级到 Beta2 的新变化

作者:闵涛 文章来源:闵涛的学习笔记 点击数:3491 更新时间:2009/4/23 10:48:41
teLoaded TemplateParser Will start looking for EnableViewState on page directives FMaintainState FEnableViewState

StateBag, StateItem, and IStateManager have not changed.

         The ASP.NET persistence format of properties, collections, and templates has changed. The new format is easier to understand, more consistent, and supports a broader range of property types with our standard parsing and persisting classes. In particular:

1)       The current inner persistence format tags are no longer supported.

2)       The persistence syntax on the top level tag as it is currently done for style properties is still supported.

3)       The "inner tag" persistence of complex properties like HeaderStyle is still supported.

4)       The "inner tag" persistence of template properties as an inner XML element that matches the property name, with no namesepace prefix, is still supported. Control classes which support persistence of Template properties might not be marked InnerChildren(true). See item 6 below.

5)       The "inner tag" persistence of collection properties is still supported.

6)       Inner persistence is disabled for any control that implements the [InnerChildren(true)] attribute on the Control class. The default value for this attribute is false. When true, all nested tags will be treated as literal inner content and will not be parsed. This attribute introduces a limitation: controls that support inner children cannot also persist collection or template properties.

7)       A terse "inner tag" persistence for controls that have a single, default collection property is still supported. In order to support the terse format, the property must be marked as follows.

[PersistenceType(PersistenceMode.DefaultCollection)]

            public ListItemCollection Items { ... }

  

         In System.Web.UI.Web controls, the MaximumControl and MinimumControl properties have been cut from RangeValidator. RangeValidator now always uses the MinimumValue and MaximumValue properties. Use of controls or values complicated the control because two comparison inputs never needed to be used at the same time. It is common to use a Control and a Value together, but this can also be achieved using a CompareValidator.

         In the ASP.NET Configuration, web.config at the computer level was renamed computer.config. In Beta 1, all config files were named config.web. Early in Beta 2, all config files were renamed to web.config. This change renames just the web.config in the common language runtime bin directory to computer.config.

         Page.Navigate() will be removed. Instead of using Page.Navigate, page developers should revert back to using Response.Redirect() to redirect users to different pages.

         In the ASP.NET Configuration, <appsettings> and IConfigurationSectionHandler now return a NameValueCollection instead of a Hashtable / IDictionary. The IConfigurationSectionHandler interface has been changed to object Create(Object parent, ConfigurationContext confiGContext, XmlNode section);

Old Code:

IDictionary appsettings = (IDictionary)Context.GetConfig("appsettings");

Create(Object parent, IDictionary confiGContext, XmlNode section);

New Code:

NameValueCollection appsettings = (NameValueCollection)Context.GetConfig("appsettings");

Create(Object parent, ConfigurationContext confiGContext, XmlNode section);  

         System.Web.UI.Page.ClientTarget has changed from the enum type ClientTarget to a string. It is still a page directive, but it now maps to entries in the .config file that override browser sniffing if it is nonblank. The page directive should still work as before for "Uplevel" and "Downlevel" values, although they need to be changed if they were referred to in code. IsUplevel() has been removed. ClientTarget will change the results of BrowserCaps, so IsUplevel() should be replaced with a more specific check of browser caps.  

Old Code:

Page p = new Page;

p.ClientTarget=ClientTarget.Uplevel;

if (p.IsUplevel) >= 0)) {厎

New Code:

Page p = new Page;

p.ClientTarget= "Uplevel"; // Example of a browser caps check

if (p.Request.Browser.MSDomVersion.Major >= 4) {

         The System.Web.UI.Web controls.BaseValidator protected methods Convert(), Compare(), CanConvert(), and GetDateElementOrder() have been moved from BaseValidator to BaseCompareValidator. These types should not have been used.

         System.Web.HttpCachePolicy.SetEtagFromFileDependencies() has been renamed to SetETagFromFileDependencies() (capitalized ''''T'''').

         The XSP registry settings key has been changed from HKLM\Software\Microsoft\XSP to HKLM\Software\Microsoft\ASP.NET.

         HttpCacheVary is deprecated, and has been renamed to HttpCacheVaryByHeaders. HttpCachePolicy.Vary is deprecated, and has been renamed VaryByHeaders.

         The unmanaged ASP.NET binaries have been renamed from xsp* to aspnet_*.

Old form New form xspisapi.dll aspnet_isapi.dll xsprc.dll aspnet_rc.dll xspstate.exe aspnet_state.exe xspwp.exe aspnet_wp.exe xspperf.dll aspnet_perf.dll xspperf.ini aspnet_perf.ini ctrnames.h aspnet_perf.h

This change will affect setup. It should not affect other code. It will affect tests using xsptool if they call

Ecbhost.Use "/", ".", "xspisapi.dll".

This can be changed to either

Ecbhost.Use "/", ".", "aspnet_isapi.dll"

or just

Ecbhost.Use "/", ".", ""

         In computer.config and web.config, the < security > section has been broken out into separate configuration sections.

Old Code:

< security > < authentication > ... < identity > ...

< authorization > ... < /security >

New Code:

< authentication > ... < identity > ... < authorization > ...

         The Config XML files (computer.config, web.config) use camel-casing for tag names. The following is a list of most tags that have been updated:

applicationEnableAuthentication

asyncOption

cpuMask

enable timeout

enableCookielessSessions

globalEnableAuthentication

idleTimeout

memoryLimit

requestAcks

requestLimit

requestQueueLimit

shutdownTimeout

sqlconnectionstring

sqlConnectionString

stateconnectionstring

stateConnectionString

userAgent

webGarden

         The BaseFile properties and AddBaseFile() methods have been removed from System.CodeDom.Compiler.TempFileCollection. These are no longer needed, since TempFileCollection no longer uses a .tmp base file.

         HtmlControls and Web controls now privately implement all methods on IPostBackDataHandler and IPostBackEventHandler. Note that, in general, these methods should not be called from outside of the ASP.NET framework.

Old Code:

myControl.LoadPostData(?

New Code:

((IPostBackDataHandler) myControl).LoadPostData(?

         ASP.NET error processing has been changed. Page.HandleError() has been replaced by the Page_Error event. Application.LastError() has been replaced by Server.GetLastError(). Use Server.GetLastError() to get the exception that was thrown (it is not passed to the function like Application.LastError() was in Page.HandleError()). Server.ClearError() has been added.

         The HttpUtility class has been modified with some renames as well as new functionality. Functions that accept/return strings previously had ToString/FromString suffixes; these have been removed.The functions that return byte[] now have a ToBytes suffix. When the encoding is missing, UTF8 is implied.

Old name New signature UrlDecodeFromString string UrlDecode(string str, Encoding e); UrlEncode byte[] UrlEncodeToBytes(string str); UrlEncodeToString string UrlEncode(string str, Encoding e); UrlEncodeToStringUnicode string UrlEncodeUnicode(string str); UrlEncodeUnicode byte[] UrlEncodeUnicodeToBytes(string str)

上一页  [1] [2] [3] [4] [5] [6] [7]  下一页


[Delphi程序]升级到Delphi 6 - 兼容性问题(中文全文)  [Delphi程序]升级到Delphi 6 - 兼容性问题之三(完)
[Delphi程序]升级到Delphi 6 - 兼容性问题之二  [Delphi程序]升级到Delphi 6 - 兼容性问题之一
[Web开发]彻底放弃IIS让Apache也支持ASP.NET  [Web开发]ASP.NET 2.0发送电子邮件中存在的问题
[Web开发]ASP.NET 2.0移动开发之属性重写和模板化  [Web开发]ASP.NET 2.0中实现模板中的数据绑定
[Web开发]ASP.NET 母版页概述  [Web开发]ASP.NET 2.0 ObjectDataSource控件
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Web开发  · 网页制作
    · 平面设计  · 网站运营
    · 网站推广  · 搜索优化
    · 建站心得  · 站长故事
    · 互联动态
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台