asp解决URL含有特殊字符引发的错误

时间:2009-03-25    点击:1856   
<%
'定义含有特殊字符的字符串
Dim Str, StrURLEncode
Str="value=#%&+\=?"
'用URLEncode方法进行编码
StrURLEncode=Server.URLEncode(Str)
'显示传递的参数
Response.Write "<b>字符串:</b>" & Str &"<br>"
'显示所有的查询字符串
Response.Write "<b>查询字符串:<b>"
Response.Write Request.QueryString
Response.Write "<br><b>编码后传递的参数是</b>"
Response.Write Request.QueryString ("Str")
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE></TITLE>
</HEAD>
<BODY>
<P><a href="URLEncode.asp?Str=<%=Str%>">字符串链接</a></P>
<P><a href="URLEncode.asp?Str=<%=StrURLEncode%>">URLEncode编码链接</a></P>
</BODY>
</HTML>
asp用Cookies实现仅弹出一次的窗口
asp清除页面缓存
asp获取用户浏览器信息
asp获取用户真实的IP地址
asp判断网站的虚拟物理路径
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 All Rights Reserved