开发者网络 动网主机 支持论坛 邮局 帮助
当前位置:网络学院ASP技术系统相关 → 转换ASP到ASP+
转换ASP到ASP+
日期:2000年9月1日 作者: 人气:     [ ]
Converting to ASP+
The conversion process from ASP to ASP+ will depend on the complexity of your existing pages. Databases,
hence ADO, is a great example. ADO is now ADO+ and much different. Therefore if you want your database
pages to be ADO+ ASP+ pages, the learning curve is a little steeper. Your old code will work in most cases
with minimal adjustments (mainly structure).

Structure
The way you write your classic ASP pages will determine the level of technicality in converting your
classic ASP pages to ASP+. VBScript is a subset of VB but not the same as VB therefore minor changes,
mainly formatting, will be required. Structure will be the biggest issue. Get used to the Object Oriented
World. And get used to seeing cleaner code. VB and HTML coding must be separated where as with VBScript
you could intertwine it with HTML.

Mix and match HTML/VBScript
If you do this a lot inside your Functions and Subs,


<%
URL = request.servervariables("URL")
%>
<FONT FACE="arial" SIZE="2">
The URL was <%=URL%>


Then you have work to do. ASP+/VB does not allow ASP code to be mixed with HTML freely inside of functions
and Subroutines. They must be separated. In order for this to run in ASP+, all lines must be converted to
VB response.write statements. Not VBScript response.write statements. Notice the parenthesis. This will be
the most cumbersome part of converting ASP pages to ASP+ pages.

This would be the proper way with ASP+/VB


URL = request.servervariables("URL")
response.write ("<FONT FACE=""arial"" SIZE=""2"">)
response.write ("The URL was "& URL & "</FONT>")



Function Calls

With VBScript/ASP you write your functions like this

<%
Function doIt()
response.write ("Yes")
End Function


Function doIt2()
response.write ("Yes")
End Function%>

The following way is how you will need to write your functions in ASP+/VB. The most important thing here
is the <SCRIPT> tags.


<SCRIPT LANGUAGE="VB" RUNAT="server">

Function doIt()
response.write ("Yes")
End Function


Function doIt2()
response.write ("No")
End Function


</SCRIPT>

(出处:)

相关文章:
 
·利用ASP+JMAIL进行邮件群发的新思路
·客户端用ASP+rds+VBA参生报表(高级篇)
·NT及低配置老机上用ASP.net的体会--M2上也用ASP+
·ASP+Access的安全隐患及对策
·用ASP+XML打造留言本 - 4
·用ASP+XML打造留言本 - 3
·用ASP+XML打造留言本 - 2
·用ASP+XML打造留言本 - 1
·使用 ASP+ 列表绑定控件(下)
·使用 ASP+ 列表绑定控件(中)
相关软件:
 
·ASP+XML 精美留言本
·ASP+ config.web Editor(XML)
·asp+高级教程
·显示系统日志(ASP+例子)
·ASP+性能测试源程序
·ASP+图像计数器
·ASP+ config.web Editor(XML)
·asp+高级教程
说明:本站部分内容收集于网络,如有侵犯您的权益请来信告知,我们会第一时间进行处理,谢谢
 → 特别推荐
 → 热点TOP10

关于本站 | 诚聘英才 | 业务合作 | 联系我们 | 广告合作 | 收藏本站

海口动网先锋网络科技有限公司版权所有
Copyright ? 2000 - 2003 AspSky.Net
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077