<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lisong&#039;s Blog &#187; ASP</title>
	<atom:link href="http://www.imwls.com/tag/asp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.imwls.com</link>
	<description>stay away from the programming</description>
	<lastBuildDate>Sun, 22 Aug 2010 01:41:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>ASP常用自定义函数--IsValidEmail()</title>
		<link>http://www.imwls.com/asp-function-isvalidemail</link>
		<comments>http://www.imwls.com/asp-function-isvalidemail#comments</comments>
		<pubDate>Tue, 17 Feb 2009 05:19:02 +0000</pubDate>
		<dc:creator>木公</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://www.imwls.com/?p=329</guid>
		<description><![CDATA[Public Function IsValidEmail(email)
Dim names, name, i, c
IsValidEmail = True
names = Split(email...]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="asp"><span style="color: #008000;">'=============================================================</span>
<span style="color: #008000;">'检查Email是否合法</span>
<span style="color: #008000;">'=============================================================</span>
<span style="color: #990099; font-weight: bold;">Public</span> <span style="color: #0000ff; font-weight: bold;">Function</span> IsValidEmail<span style="color: #006600; font-weight:bold;">&#40;</span>email<span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">Dim</span> names, name, i, c
IsValidEmail <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">True</span>
names <span style="color: #006600; font-weight: bold;">=</span> Split<span style="color: #006600; font-weight:bold;">&#40;</span>email, <span style="color: #cc0000;">&quot;@&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">If</span> <span style="color: #330066;">UBound</span><span style="color: #006600; font-weight:bold;">&#40;</span>names<span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&lt;&gt;</span> <span style="color: #800000;">1</span> <span style="color: #990099; font-weight: bold;">Then</span>
   IsValidEmail <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">False</span>
   Exit <span style="color: #0000ff; font-weight: bold;">Function</span>
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">If</span>
<span style="color: #990099; font-weight: bold;">For</span> <span style="color: #990099; font-weight: bold;">Each</span> name <span style="color: #990099; font-weight: bold;">In</span> names
   <span style="color: #990099; font-weight: bold;">If</span> <span style="color: #330066;">Len</span><span style="color: #006600; font-weight:bold;">&#40;</span>name<span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&lt;</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">0</span> <span style="color: #990099; font-weight: bold;">Then</span>
 IsValidEmail <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">False</span>
 Exit <span style="color: #0000ff; font-weight: bold;">Function</span>
  <span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">If</span>
  <span style="color: #990099; font-weight: bold;">For</span> i <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">1</span> <span style="color: #990099; font-weight: bold;">To</span> <span style="color: #330066;">Len</span><span style="color: #006600; font-weight:bold;">&#40;</span>name<span style="color: #006600; font-weight:bold;">&#41;</span>
 c <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">Lcase</span><span style="color: #006600; font-weight:bold;">&#40;</span>Mid<span style="color: #006600; font-weight:bold;">&#40;</span>name, i, <span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
 <span style="color: #990099; font-weight: bold;">If</span> <span style="color: #330066;">InStr</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;abcdefghijklmnopqrstuvwxyz_-.&quot;</span>, c<span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&lt;=</span> <span style="color: #800000;">0</span> <span style="color: #0000ff; font-weight: bold;">and</span> <span style="color: #990099; font-weight: bold;">not</span> IsNumeric<span style="color: #006600; font-weight:bold;">&#40;</span>c<span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #990099; font-weight: bold;">Then</span>
   IsValidEmail <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">False</span>
   Exit <span style="color: #0000ff; font-weight: bold;">Function</span>
 <span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">If</span>
 <span style="color: #990099; font-weight: bold;">Next</span>
 <span style="color: #990099; font-weight: bold;">If</span> Left<span style="color: #006600; font-weight:bold;">&#40;</span>name, <span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;.&quot;</span> <span style="color: #0000ff; font-weight: bold;">or</span> Right<span style="color: #006600; font-weight:bold;">&#40;</span>name, <span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;.&quot;</span> <span style="color: #990099; font-weight: bold;">Then</span>
  IsValidEmail <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">False</span>
  Exit <span style="color: #0000ff; font-weight: bold;">Function</span>
  <span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">If</span>
<span style="color: #990099; font-weight: bold;">Next</span>
<span style="color: #990099; font-weight: bold;">If</span> <span style="color: #330066;">InStr</span><span style="color: #006600; font-weight:bold;">&#40;</span>names<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span>, <span style="color: #cc0000;">&quot;.&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&lt;=</span> <span style="color: #800000;">0</span> <span style="color: #990099; font-weight: bold;">Then</span>
   IsValidEmail <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">False</span>
   Exit <span style="color: #0000ff; font-weight: bold;">Function</span>
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">If</span>
i <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">Len</span><span style="color: #006600; font-weight:bold;">&#40;</span>names<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span> - InStrRev<span style="color: #006600; font-weight:bold;">&#40;</span>names<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span>, <span style="color: #cc0000;">&quot;.&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">If</span> i <span style="color: #006600; font-weight: bold;">&lt;&gt;</span> <span style="color: #800000;">2</span> <span style="color: #0000ff; font-weight: bold;">and</span> i <span style="color: #006600; font-weight: bold;">&lt;&gt;</span> <span style="color: #800000;">3</span> <span style="color: #990099; font-weight: bold;">Then</span>
   IsValidEmail <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">False</span>
   Exit <span style="color: #0000ff; font-weight: bold;">Function</span>
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">If</span>
<span style="color: #990099; font-weight: bold;">If</span> <span style="color: #330066;">InStr</span><span style="color: #006600; font-weight:bold;">&#40;</span>email, <span style="color: #cc0000;">&quot;..&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&gt;</span> <span style="color: #800000;">0</span> <span style="color: #990099; font-weight: bold;">Then</span>
   IsValidEmail <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">False</span>
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">If</span>
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #0000ff; font-weight: bold;">Function</span></pre></div></div>

<p><div class="note"><div class="notetip"><strong>'说明: 当出现恶意提交时,返回False<br />
'示例: If IsValidEmail("lackyking#gmail.com")= False Then Response.Write "False"</strong></div></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.imwls.com/asp-function-isvalidemail/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP常用函数-GetLocalIP/获取真实客户端IP</title>
		<link>http://www.imwls.com/asp-function-getlocalip-get-host-really-ip</link>
		<comments>http://www.imwls.com/asp-function-getlocalip-get-host-really-ip#comments</comments>
		<pubDate>Mon, 02 Feb 2009 06:20:32 +0000</pubDate>
		<dc:creator>木公</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://www.imwls.com/?p=311</guid>
		<description><![CDATA[1

2

3

<span class="readmore"><a href="http://www.imwls.com/asp-function-getlocalip-get-host-really-ip" title="ASP常用函数-GetLocalIP/获取真实客户端IP">Read More: 879 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="asp"><span style="color: #008000;">'=============================================================</span>
<span style="color: #008000;">'获取真实的客户端IP</span>
<span style="color: #008000;">'=============================================================</span>
<span style="color: #0000ff; font-weight: bold;">Function</span> GetLocalIP<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">Dim</span> strIPAddr
  <span style="color: #990099; font-weight: bold;">If</span> <span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;HTTP_X_FORWARDED_FOR&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;&quot;</span> <span style="color: #0000ff; font-weight: bold;">or</span> <span style="color: #330066;">InStr</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;HTTP_X_FORWARDED_FOR&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>, <span style="color: #cc0000;">&quot;unknown&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&gt;</span> <span style="color: #800000;">0</span> <span style="color: #990099; font-weight: bold;">Then</span>
    strIPAddr <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;REMOTE_ADDR&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">ElseIf</span> <span style="color: #330066;">InStr</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;HTTP_X_FORWARDED_FOR&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>, <span style="color: #cc0000;">&quot;,&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&gt;</span> <span style="color: #800000;">0</span> <span style="color: #990099; font-weight: bold;">Then</span>
    strIPAddr <span style="color: #006600; font-weight: bold;">=</span> Mid<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;HTTP_X_FORWARDED_FOR&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>, <span style="color: #800000;">1</span>, <span style="color: #330066;">InStr</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;HTTP_X_FORWARDED_FOR&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>, <span style="color: #cc0000;">&quot;,&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>-<span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">ElseIf</span> <span style="color: #330066;">InStr</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;HTTP_X_FORWARDED_FOR&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>, <span style="color: #cc0000;">&quot;;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&gt;</span> <span style="color: #800000;">0</span> <span style="color: #990099; font-weight: bold;">Then</span>
    strIPAddr <span style="color: #006600; font-weight: bold;">=</span> Mid<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;HTTP_X_FORWARDED_FOR&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>, <span style="color: #800000;">1</span>, <span style="color: #330066;">InStr</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;HTTP_X_FORWARDED_FOR&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>, <span style="color: #cc0000;">&quot;;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>-<span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">Else</span>
    strIPAddr <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;HTTP_X_FORWARDED_FOR&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">If</span>
  GetLocalIP <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">Trim</span><span style="color: #006600; font-weight:bold;">&#40;</span>Mid<span style="color: #006600; font-weight:bold;">&#40;</span>strIPAddr,<span style="color: #800000;">1</span>,<span style="color: #800000;">30</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #0000ff; font-weight: bold;">Function</span></pre></td></tr></table></div>

<p><div class="note"><div class="notetip"><strong>Response.Write GetLocalIP()</strong></div></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.imwls.com/asp-function-getlocalip-get-host-really-ip/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP常用自定义函数--CutStr</title>
		<link>http://www.imwls.com/asp-function-cutstr</link>
		<comments>http://www.imwls.com/asp-function-cutstr#comments</comments>
		<pubDate>Wed, 07 Jan 2009 02:44:10 +0000</pubDate>
		<dc:creator>木公</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://www.imwls.com/?p=218</guid>
		<description><![CDATA[Function CutStr&#40;byVal Str,byVal StrLen&#41;

	Dim l,t,c,i

	l=Len&#40;str&#41;

<span class="readmore"><a href="http://www.imwls.com/asp-function-cutstr" title="ASP常用自定义函数--CutStr">Read More: 252 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="asp"><span style="color: #0000ff; font-weight: bold;">Function</span> CutStr<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">byVal</span> Str,<span style="color: #990099; font-weight: bold;">byVal</span> StrLen<span style="color: #006600; font-weight:bold;">&#41;</span>
	<span style="color: #990099; font-weight: bold;">Dim</span> l,t,c,i
	l<span style="color: #006600; font-weight: bold;">=</span><span style="color: #330066;">Len</span><span style="color: #006600; font-weight:bold;">&#40;</span>str<span style="color: #006600; font-weight:bold;">&#41;</span>
	t<span style="color: #006600; font-weight: bold;">=</span><span style="color: #800000;">0</span>
	<span style="color: #990099; font-weight: bold;">For</span> i<span style="color: #006600; font-weight: bold;">=</span><span style="color: #800000;">1</span> <span style="color: #990099; font-weight: bold;">To</span> l
		c<span style="color: #006600; font-weight: bold;">=</span>AscW<span style="color: #006600; font-weight:bold;">&#40;</span>Mid<span style="color: #006600; font-weight:bold;">&#40;</span>str,i,<span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
		<span style="color: #990099; font-weight: bold;">If</span> c<span style="color: #006600; font-weight: bold;">&amp;</span>lt<span style="color: #006600; font-weight: bold;">;</span><span style="color: #800000;">0</span> <span style="color: #0000ff; font-weight: bold;">Or</span> c<span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #800000;">255</span> <span style="color: #990099; font-weight: bold;">Then</span> t<span style="color: #006600; font-weight: bold;">=</span>t+<span style="color: #800000;">2</span> <span style="color: #990099; font-weight: bold;">Else</span> t<span style="color: #006600; font-weight: bold;">=</span>t+<span style="color: #800000;">1</span>
		<span style="color: #990099; font-weight: bold;">IF</span> t<span style="color: #006600; font-weight: bold;">&gt;=</span>StrLen <span style="color: #990099; font-weight: bold;">Then</span>
			CutStr<span style="color: #006600; font-weight: bold;">=</span>left<span style="color: #006600; font-weight:bold;">&#40;</span>Str,i<span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight: bold;">&amp;</span><span style="color: #cc0000;">&quot;...&quot;</span>
			Exit <span style="color: #990099; font-weight: bold;">For</span>
		<span style="color: #990099; font-weight: bold;">Else</span>
			CutStr<span style="color: #006600; font-weight: bold;">=</span>Str
		<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">If</span>
	<span style="color: #990099; font-weight: bold;">Next</span>
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #0000ff; font-weight: bold;">Function</span></pre></div></div>

<p><div class="note"><div class="notetip"><span style="color: #ff6600;">CutStr("ASP常用自定义函数--CutStr",5)<br />
显示：“ASP常用...”</span></div></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.imwls.com/asp-function-cutstr/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP常用自定义函数--ShowMsg</title>
		<link>http://www.imwls.com/asp-function-showmsg</link>
		<comments>http://www.imwls.com/asp-function-showmsg#comments</comments>
		<pubDate>Wed, 07 Jan 2009 02:29:27 +0000</pubDate>
		<dc:creator>木公</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://www.imwls.com/asp%e5%b8%b8%e7%94%a8%e8%87%aa%e5%ae%9a%e4%b9%89%e5%87%bd%e6%95%b0-showmsg/</guid>
		<description><![CDATA[Sub ShowMsg&#40;byval msg,byval url&#41;

  Response.Write&#40;&#34;&#34;&#41;

  IF url=&#34;&#34; Then

<span class="readmore"><a href="http://www.imwls.com/asp-function-showmsg" title="ASP常用自定义函数--ShowMsg">Read More: 232 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="asp"><span style="color: #0000ff; font-weight: bold;">Sub</span> ShowMsg<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">byval</span> msg,<span style="color: #990099; font-weight: bold;">byval</span> url<span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">IF</span> url<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;&quot;</span> <span style="color: #990099; font-weight: bold;">Then</span>
    <span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">Else</span>
    <span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
  <span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">IF</span>
  <span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #990099; font-weight: bold;">End</span>
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #0000ff; font-weight: bold;">Sub</span></pre></div></div>

<p><div class="note"><div class="notetip"><span style="color: #ff9900;">用法：Call ShowMsg("User name is wrong!","") '返回前一页<br />
Call ShowMsg("User name is wrong!","index.asp") '跳转到index.asp</span> </div></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.imwls.com/asp-function-showmsg/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP获取当前页面地址栏URL函数</title>
		<link>http://www.imwls.com/asp-geturl</link>
		<comments>http://www.imwls.com/asp-geturl#comments</comments>
		<pubDate>Wed, 29 Oct 2008 05:51:57 +0000</pubDate>
		<dc:creator>木公</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://www.imwls.com/index.php/favorite/asp%e8%8e%b7%e5%8f%96%e5%bd%93%e5%89%8d%e9%a1%b5%e9%9d%a2%e5%9c%b0%e5%9d%80%e6%a0%8furl%e5%87%bd%e6%95%b0.html</guid>
		<description><![CDATA[Function GetURL&#40;&#41;

&#160;

 Dim Get_HOST : Get_HOST=Request.ServerVariables&#40;&#34;HTTP_HOST&#34;&#41;

<span class="readmore"><a href="http://www.imwls.com/asp-geturl" title="ASP获取当前页面地址栏URL函数">Read More: 265 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p><strong><span style="font-family: Courier New"></p>

<div class="wp_syntax"><div class="code"><pre class="asp"><span style="color: #0000ff; font-weight: bold;">Function</span> GetURL<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
 <span style="color: #990099; font-weight: bold;">Dim</span> Get_HOST <span style="color: #006600; font-weight: bold;">:</span> Get_HOST<span style="color: #006600; font-weight: bold;">=</span><span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;HTTP_HOST&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
 <span style="color: #990099; font-weight: bold;">Dim</span> Get_URL  <span style="color: #006600; font-weight: bold;">:</span> Get_URL<span style="color: #006600; font-weight: bold;">=</span><span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;URL&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
 <span style="color: #990099; font-weight: bold;">Dim</span> Get_String <span style="color: #006600; font-weight: bold;">:</span> Get_String<span style="color: #006600; font-weight: bold;">=</span><span style="color: #990099; font-weight: bold;">Request</span>.<span style="color: #330066;">ServerVariables</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;QUERY_STRING&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
 GetURL<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Http://&quot;</span><span style="color: #006600; font-weight: bold;">&amp;</span>Get_HOST<span style="color: #006600; font-weight: bold;">&amp;</span>Get_URL<span style="color: #006600; font-weight: bold;">&amp;</span><span style="color: #cc0000;">&quot;?&quot;</span><span style="color: #006600; font-weight: bold;">&amp;</span>Get_String
&nbsp;
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #0000ff; font-weight: bold;">Function</span></pre></div></div>

<p><strong>Response.Write GetURL</strong><br />
</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.imwls.com/asp-geturl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
