设为首页 加入收藏 网站首页
休闲娱乐
军事·社会百态·娱乐八卦·校园
体育·美女写真·幽默笑话·游戏
综合·在线视频·搞笑图片·灵异
两性生活
两性知识·性爱技巧
情色实录·两性图片
女性健康·同性之恋
电脑网络
网络编程·网页制作·软件教学
操作系统·图形图象·冲浪宝典
网络安全·邮件系统·认证考试
热点专题
芙蓉·真人漫画
72式·欲望都市
帅哥·人体彩绘
您现在的位置: 世纪中国 >> 网络编程 >> ASP教学 >> ASP文摘 >> 教程正文
微软提供的ASP-HTML转换工具
作者:中国图霸    教程来源:网络    点击数:    更新时间:2006-12-29
en Explorer in the folder that contains the specified ASP page and double-click the
item, in most cases Visual InterDev?will open because it is the program that is usually registered to edit
ASP files. If you want to be able to double-click on ASP files and see their content, you could associate
them with a program like Visual InterDev. However, remember that a generic ASP page might be using objects
like Session or Application that the client-side parser doesn't support.

Figure 6 The Custom Browser versus Internet Explorer  

Consider a page like the following, which is nearly identical to the previous one except for a
Response.End statement. <html>
<body>
<% x=1 %>
<% Response.Write "Hello, world!" %>
<hr>
<% Response.End %>
The value of X is <%= x%>
</body>
</html>


Figure 7 shows that the End method correctly stops the processing. If you're confused by the truncated
output in the HTML textbox, don't be too concerned. Try viewing the same document through Internet
Explorer and HTTP and you'll see that the HTML the browser receives from the Web server is exactly the
same.

Figure 7 Using Response.End  


A possible stumbling block in the conversion process is the meaning of the = sign which is often used
within <%...%> code blocks to denote Response.Write. In fact, The value of X is <%= x%>


is exactly the same as The value of X is <% Response.Write x %>


To deal with this particular situation (and other similar circumstances) I've added the ResolveAmbiguity
method to the CAspParser class. Each time that the script command begins with "=" it replaces the
character with a Response.Write.



A More Complicated Page
So far I've worked with a very simple ASP page. Let's use the client-side parser to work with a more
complex ASP page that involves databases. Figure 8 shows an ASP page that fills and displays a table with
a few records taken from an OLE DB data source. Despite the use of ActiveX Data Objects (ADO), the
structure of the page is relatively simple. To make this example more realistic I would need to implement
the Request object and the simulation of the POST and the GET HTTP commands. I'll cover those topics next
month.

Figure 9 The Page Rendered in Internet Explorer  

In Fi

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

分类推荐
社会 社会 娱乐 军事 校园
幽默 体育 女性 专题
电脑 编程 网页 软件 系统
安全 图象 冲浪 认证
搞笑 人物 动物 物品 表情
签名 色图 漫画 奇闻
美女 明星 清纯 自拍 欧美
丝袜 卡通 性感 走光
两性 知识 性图 孕育 技巧
同性 单身 情感 实录
视频 写真 搞笑 MTV 翻唱
写实 片段 游戏 综艺
ASP文摘热门文章
普通教程 微软提供的ASP-HTML转换工具
普通教程 <展现C#>前言(补充)和第三章第
普通教程 .Net的精髓-XML和SOAP(一)
普通教程 让ASP应用系统成为跨平台的
普通教程 用Asp备份与恢复SQL Server 数
普通教程 在ASP中使用FSO组件生成HTML页
普通教程 .Net将如何影响我们?(二)
普通教程 ASP应用:用stream读文件
普通教程 利用XSL和ASP在线编辑XML文档
普通教程 微软下一代Web服务器IIS7细节披
普通教程 ASP.Net的几大热点问题
普通教程 微软.Net卧虎藏龙
普通教程 Microsoft .NET 框架常见问题(
普通教程 动态网页制作(二)
普通教程 用asp实现的代码批量修改程序
普通教程 一个汉字转成拼音的代码
普通教程 ASP用JMail、CDO发送邮件
普通教程 编写一个asp代码执行器
普通教程 在VB中利用Word宏命令开发ASP组
普通教程 学以致用 驳“ASP低能论”

  广东广州海珠区 世纪网络工作室 版权所有 上海电信提供网络带宽
信箱: 9297659@qq.com 粤ICP备06113754号