打印本文 打印本文 关闭窗口 关闭窗口
ASP.NET 从Beta1 升级到 Beta2 的新变化
作者:武汉SEO闵涛  文章来源:敏韬网  点击数4579  更新时间:2009/4/23 10:48:41  文章录入:mintao  责任编辑:mintao
ses (ControlCollection, ITemplate, IStateManager, IDataBindingsAccessor, and DataboundLiteralControl).

         Removed AllowsChildren from Control. Override CreateControlCollection() in your control and return an instance of EmptyControlCollection.

         Renamed Control.StateBagIgnoresCase to ViewStateIgnoresCase.

         ControlCollection is now public, and does not have an overload which takes in a Boolean value indicating whether Add is allowed.

         ITemplate.Initialize() renamed to InstantiateIn().

         IStateManager.IsMarked changed to the property IsTrackingViewState.

         IStateManager.TrackState renamed to TrackViewState.

         IStateManager changes also caused the corresponding methods on Control and Style to be changed in the same way.

         Renamed DataboundLiteralControl to DataBoundLiteralControl.

         IDataBindingsAccessor.HasDataBindings() changed to a property with the same name.

         Changes to DataBinder.Eval.

         The expression is now processed in a case-insensitive manner.

         New non-quoted format for string indexes added (the old format still works, but the designer will not process them). For example,
  DataBinder.Eval(DataSet1, "Tables[Table1].DefaultView")

         Changes to [WebMethod] attribute to support common enums for declaring transactions provided by Microsoft.ComServices.

Old Code:

[WebMethod(TransactionMode=TransactionMode.Required)]

New Code:

[WebMethod(TransactionSupport=TransactionSupport.Required)]

WebMethods can only participate as the root object in a transaction so the only options you would then be able to use would be

[WebMethod(TransactionSupport=TransactionSupport.Required] [WebMethod(TransactionSupport=TransactionSupport.RequiresNew]

         Changed the name and type of WebMethodAttribute.TransactionSupport to TransactionOption. This is the last step in the process of consolidating three transaction-related enums (System.Web.Util.TransactionSupport in ASP.NET, System.Web.Services.TransactionMode in WebService, and Microsoft.ComServices.TransactionOption in ComServices) to a single enum (TransactionOption).

         Removed the public static method System.Web.Services.Protocols.ValueCollectionParameterReader.UTF8Decode(). This method does not form a complete suite of functionality in this place. Users should use encoding and decoding methods available on System.Text.Encoding or System.Web.HttpUtility.

         In ASP.NET, properties on TemplateParser and related classes have been removed.The following classes have also been removed.

    • System.Web.TraceEnable
    • BaseParser
    • PageParser
    • WebHandlerParser
    • TemplateControlParser
    • TemplateParser
    • UserControlParser

         Register attributes are now required on the register directive. Visual Studio.NET requires this, and pages that do not have it do not open in VS.

         The /extendedNaming option has been removed from wsdl.exe and xsd.exe. The concept of extended properties has been removed, so this has no meaning.

         The Make Assembly attribute required on the register directive.

Visual Studio.NET requires it, and pages that do not have it do not open in Visual Studio.NET.

         Removed /extendedNaming from wsdl.exe and xsd.exe.

The /extendedNaming option will be removed from wsdl.exe and xsd.exe. The concept of extended properties has been removed, so this has no meaning.

         WebMethodAttribute: changed name and type of property TransactionSupport to TransactionOption.

This is the last step in the process of consolidating three transaction-related enums (System.Web.Util.TransactionSupport in ASP.NET, System.Web.Services.TransactionMode in WebService, and Microsoft.ComServices.TransactionOption in ComServices) to a single enum.

         Removed public static method System.Web.Services.Protocols.ValueCollectionParameterReader::UTF8Decode.

This method does not form a complete suite of functionality in this place; applications should use encoding and decoding methods available on System.Text.Encoding and/or System.Web.HttpUtility. This method was only used as an internal helper for formatting.

         Properties on TemplateParser and related classes need to be internal.

The following classes are implementation details and are being made internal to the framework.    System.Web.TraceEnable *    A consequence of this is that System.Web.UI.Page.TraceEnabled will return a Boolean instead of a System.Web.TraceEnable type.

         Removed ReadChars, ReadBinHex and ReadBase64 from the XmlReader and changed to implement them only on the XmlTextReader.

These methods exist so that you can access the stream, so they are not necessary on the node.

         Changed System.Web.UI.WebControls.Style.AddAttributesToRender to be nonvirtual In System.Web.UI.WebControls.Style.

Currently:

public virtual void AddAttributesToRenderr(HtmlTextWriter writer);

and

public virtual void AddAttributesToRenderr(HtmlTextWriter writer, WebControl owner)

This does not affect Visual Studio.NET.The WebControl class calls this, so most controls (external implementations), should not be affected either, given that the original method is still going to exist with public access.

         Moved DataBindingCollectionConverter from System.Web.UI to System.Web.UI.Design.

         Moved System.Web.UI.DataBindingCollectionConverter to System.Web.UI.Design.DataBindingCollectionConverter.

This is a namespace change without requiring this to move across assemblies. This class is implemented in System.Web.Design.dll.However, this is used only by the HtmlControlDesigner which lives in the Frameworks tree as well.It should not impact any code in the Visual Studio.NET tree.

         Removed CookielessSession from Machine.config.

The CookielessSessionModule and the SessionStateModule depend on each other. The architecture allows for these two modules to be merged, so they should be removed to save start up and memory costs, as well as avoid configuration errors.

         Cookies: Default set path to "/".

By default, the path for cookies created in ASP.NET uses the directory path of the application. This is case-sensitive and not often used; for example, the current path used is "/" for session cookies.To provide less confusion for end users, cookies created will use path "/" and be available throughout the application.

         Removed XmlString class.

XmlString class is now obsolete. Please use the XmlConvert class instead.

         Changed import method of ServiceImporter. New overloaded method takes place of old method.

public ServiceDescriptionImportWarnings Import(CodeCompileUnit codeCompileUnit)           

public ServiceDescriptionImportWarnings Import(CodeNamespace codeNamespace, CodeCompileUnit codeCompileUnit, string urlAppSettingKey, string appSettingBaseUrl)

         Configuration file camel casing:

In order to make the ASP.NET configuration file more consistent, all configuration tags should use camel casing (camelCasing)

         ASP.NET should not require the use of statics in generated code.

ASP.NET no longer generates CodeDom trees containing static constructors. The generated code used to use static constructors, but many third party languages do not have support for declaring static constructors.

         S

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

打印本文 打印本文 关闭窗口 关闭窗口