把ASP移植到ASP+

2016-01-29 18:03 6 1 收藏

把ASP移植到ASP+,把ASP移植到ASP+

【 tulaoshi.com - ASP 】

  Before embarking on the inevitable—and not painless—migration to ASP+, it's best to know what
compatibility issues you'll have to deal with

by Chris Kinsman


  Microsoft is set to release an exciting upgrade to ASP later in 2000. This is a major upgrade unlike the
minor changes from ASP 2.0 to 3.0. Unlike past upgrades, however, this one will not be painless. When they
designed ASP+, Microsoft had to make the hard decision occasionally to break backward compatibility in the
interest of improved functionality and features.
What you need:

ASP+ PDC Preview




At the Professional Developer Conference 2000 ASP+ Development Lead Scott Guthrie mentioned that Microsoft
was guided by the idea that "There is more Internet time ahead of us than behind us." As an ASP developer
with hundreds of thousands of lines of code directly affected by this, I am worried. At the same time, I
sincerely feel that they made the right decision.

Compatibility Issues
What does Microsoft's decision about selective backwards-compatibility mean for you? At the most basic it
means that migrating will require work. All but the most simple pages will likely require changes before
they will run correctly under ASP+. Microsoft has made available a migration path from ASP to ASP+. Both
ASP and ASP+ will run side by side on the same server without interacting. This means that your ASP
applications will continue to run—albeit without taking advantage of new ASP+ functionality—while you
are developing your new ASP+ pages. No modifications have been made to asp.dll, and nothing should break
by installing ASP+.

This side-by-side operability is accomplished by using separate filename extensions for ASP and ASP+. All
ASP+ filename extensions that I have seen so far end in an x (for example, .aspx, .asmx, etc.). The only
exception would be new pagelets (miniature ASP+ pages—more about them later) that use the .aspc
extension. This means that migration will typically entail copying an .asp file to an .aspx file, testing
it, fixing the problems, and then deploying it by relinking the rest of the site to the file with the new
extension.

Microsoft has mentioned that by the time the product ships they hope to have a conversion tool ready which
will point out incompatibilities and, in some instances, fix them for you. This won't fix all
incompatibilities but it will cover the majority. Compatibility issues come in three broad categories: API
changes, semantic changes, and language changes.

API Changes: The first set of compatibility issues arise around changes to the core ASP objects. All of
the arrays are now 0 index based. In the previous versions some arrays were 1 based and others were 0
based. For consistency, all now use a 0 base.

The second change has to do with the return types of certain objects. In ASP, Request,
Request.QueryString, and Request.Form return different results based on what is in them. If I access a
page with the following Url—http://localhost/apichanges.asp?Language=VB&Language=C#—and it contains the
following code:

<%
    ' Writes out: VB, C#
    Response.Write Request.QueryString("Language")

    ' Writes out: VB
    Response.Write Request.QueryString("Language")(1)
%
then depending on the way I invoke Request.QueryString, I will get differing results. One would have
thought that the first invocation would return a string array, as opposed to a CSV string. ASP+ has
changed this model. Now to get the individual items you must call an explicit method to get access to the
items. Using the same URL as above, the following ASP+ code will provide the same functionality:
<%
    ' Writes out: VB, C#
    Response.Write(Request

来源:http://www.tulaoshi.com/n/20160129/1504175.html

延伸阅读
标签: ASP
  ADO+引入了DataSet和DataView的概念。DataSet类似于记录集的集合,因为它能保存一个或多个数据及其之间关系的表(table)。DataView是这些表中之一的实现,类似于ADO 记录集。在上面的例子中,我们的DataSet只保存一个表:Upcoming,我们要将之驻留于ASP+服务器控件中。可以通过以下方式向DataSet中加入更多表。 *重新定义...
标签: ASP
  五、asp+ MyWeb 应用      1).概述     MyWeb是ASP+中的一门新技术,允许一个ASP+应用在没有WEB服务器的机器上运行,实际在 IE内部运行,可以离线地运行。开发上与服务器端的应用开发无异。     让客户可以在需要时进行安装,这叫demand install。    &nbs...
进入DataSet 作 者 : 雨晨 ADO+引入了DataSet和DataView的概念。DataSet类似于记录集的集合,因为它能保存一个或多个数据及其之间关系的表(table)。DataView是这些表中之一的实现,类似于ADO 记录集。在上面的例子中,我们的DataSet只保存一个表:Upcoming,我们要将之驻留于ASP+服务器控件中。可以通过以下方式向DataSet中加入更多...
标签: ASP
  4.其他 包括Intrinsic controls,以及我们渴望已久的SendMail组件,加/解密组件,可以自定义的执行表现记数器,可以读写NT日志的组件,网络访问组件。。。等等。 四. ASP+的最终版本 很显然,预览版的ASP+与运行时框架还不是十全十美的。虽然它们足以体现ASP+的新特性,然而最终版本的ASP+要比我们正在讨论的这个版本支...
标签: ASP
  8).数据访问的定制     除了DataGrid之外,还有DataList和Repeater,可以更加灵活使用,不过你需要提供模板, 用控件templates     他们也有属性DataSource,可以赋予一个ICollection对象,ItemTemplate控件指定每一个记录 显示的样子,例:     <ASP:Repeater id=&quo...

经验教程

716

收藏

12
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部