分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

ASP 基础二 内置对象

发布时间:2023-09-06 01:14责任编辑:白小东关键词:内置对象

一 Request

二 Response

三 Application

四 Session

五 Server

<script language="vbscript" runat="server">Sub Application_OnStartApplication("applicationname")="mytest"End SubSub Application_OnEndApplication("applicationname")="mytest2"End SubSub Session_OnStartSession("mysession")="1111"End SubSub Session_OnEndSession("mysession")="2222"End Sub</script>
<html><head title="test hello world"></head><% ???Application.Lock() ???application("test")="abcd" ???session("test")="abcde" ???Application.UnLock() ???????response.Write(application("applicationname")) ??????response.Write(application("applicationname2")) ?????response.Write(session("mysession")) ????????????%><% ????dim a ???dim b ???a=Request.Form("fname") ???b=Request.Form("lname") ??????????response.Write(a+"<br/>"+b+"<br/>") ????response.Write(Request.Form.Count) ???response.Write(request.QueryString("para")) ???response.Write(request.Cookies("test")) ???response.Write(request.ServerVariables("server_name")+"<br/>") ???response.Write(request.ServerVariables("request_method")+"<br/>")%><% ???dim c ????????????????response.Buffer=true ???response.CharSet="gb2312" ???response.ContentType="text/html" ???????response.Write("hello world") ???response.Cookies("test")="helloworld" ???response.Flush() ???response.End() ???response.Clear() ???response.Redirect("www.baidu.com") %><body> ???<form method="post" action="testRequest.asp?para=param121"> ???????<p> ???????????First Name: ???????????<input type="text" name="fname" /> ???????</p> ???????<p> ???????????Last Name: ???????????<input type="text" name="lname" /> ???????</p> ???????<input type="submit" value="Submit" /> ???</form></body></html>
<html><head title="test hello world"></head><body> ???<% ???????dim a ???????????????response.Write(Server.URLEncode("我的-8*&^%$%")) ???????response.Write("aaaa<br/>bbbb") ???????response.Write(Server.HTMLEncode("aaaa<br/>bbbb")) ???????response.Write(Server.MapPath("index.asp")) ???%></body></html>

ASP 基础二 内置对象

原文地址:http://www.cnblogs.com/ligenyun/p/7611089.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved