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

Creating Web Sites Before ASP.NET

作者:闵涛 文章来源:闵涛的学习笔记 点击数:679 更新时间:2009/4/23 10:39:16
Creating Web Sites Before ASP.NET
Before ASP.NET, developers using Microsoft products had two paths they could
take: Developers could either create simple HTML pages or they could use
Active Server Pages (ASP). Obviously, there were other choices as well,
including several techniques superceded by ASP. The next two sections
outline the two existing techniques for creating Web applications.

Using HTML to Create Sites
You can create a Web site using nothing but HTML if you want. However, when
you do this, you do not have the ability to provide any runtime
customization. For example, suppose you have a product catalog. If you wish
to add or delete items from the catalog, you have to go into the HTML page
that has the products and manually add and delete these products. This can
be quite laborious.

The following page, Page1.htm, provides simple support for submitting data
to another page using a submit button:

<HTML>
<BODY>
<H3>Enter Login Information</H3>
<form action="Process.htm" method="post">
Login ID <input type="textbox" value="BJones" name="txtLoginID"><br>
Password <input type="password" name="txtPassword"><BR>
<input type="submit" value="Login" name="btnLogin">

</FORM>

</BODY>
<HTML>

This page contains a Form element, which in turn contains all the data you
might want to post to a page on your Web server. In this case, when you
click Submit, you''''ll navigate to a page named Process.htm (which doesn''''t
exist, in this little example). This page would need to somehow retrieve
the values sent to it via the HTTP request. Luckily, you won''''t need to use
this technique.

Using ASP
Microsoft realized the limitations of creating active Web sites using HTML
and created Active Server Pages (ASP). (Microsoft wasn''''t alone in this梩here
are other, competing technologies, as well, that provide similar
functionality.) This technology allowed some script to run on the server,
and the final output of this script was HTML. That is, the request to the
page would cause script code to run, which in turn could render HTML for
display in any browser. For example, the script could retrieve data from a
table in a database and generate a product catalog dynamically.

The following page, Page1.asp, demonstrates how ASP applications might
appear. Notice the mixture of HTML and script code梩hat was the nature of
the ASP beast. If you want to run this page, you''''ll need to set up a
virtual root in IIS, load the page into that folder, and then browse to the
server from within a browser. (In other words, you can''''t simply
double-click ASP pages and view them in a browser梩hey require processing
by IIS in order to render their output.) Here''''s the code for the page:

<%

Dim strLogin
Dim strPassword

'''' First time through, no data
strLogin = Request("txtLoginID")
strPassword = Request("txtPassword")

%>

<HTML>
<BODY>
<H3>Enter Login Information</H3>
<FORM action="Page1.asp" method="POST">
Login ID <input type="textbox" value="" name="txtLoginID"><br>
Password <input type="password" value="" name="txtPassword"><BR>

<input type="submit" value="Login" name="btnLogin">

<div><p><%= strLogin %> - <%= strPassword %></div>
</FORM>

</BODY>
<HTML>


[聊天工具]Gmail推出新功能:Web Clip__天极Yesky  [聊天工具]Web MSN你玩了吗__天极Yesky
[系统软件]Web Browser Express 概述  [系统软件]对Internet Explorer Web 控件做一点修改
[常用软件]小技巧:三步实现Web迅雷录制PPLive节目  [常用软件]天网防火墙:打开WEB和FTP服务
[VB.NET程序]使用VB.Net做一个配置web.config功能的WinForm(原…  [VB.NET程序]vb.net控件、web service简述
[VB.NET程序]使用vbscript脚本调用web服务  [VB.NET程序]*** Web 存储系统窗体:窗体注册表 (new)***
教程录入: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……
    咸宁网络警察报警平台