<?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>นพ ภิญโญวาณิชกะ &#187; ASP</title>
	<atom:link href="http://www.nop.in.th/category/asp-active-server-page/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nop.in.th</link>
	<description>Nop Pinyowanichaka &#124; ก้าวสั้นๆ ในวันเบาๆ ของผม</description>
	<lastBuildDate>Fri, 03 Sep 2010 16:47:10 +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>โปรแกรม แปลง SQL เป็น Code ASP</title>
		<link>http://www.nop.in.th/asp-active-server-page/sql-to-asp/</link>
		<comments>http://www.nop.in.th/asp-active-server-page/sql-to-asp/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 11:05:37 +0000</pubDate>
		<dc:creator>นพ</dc:creator>
				<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://www.nop.in.th/admin/chit-chat/%e0%b9%82%e0%b8%9b%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b8%a3%e0%b8%a1-%e0%b9%81%e0%b8%9b%e0%b8%a5%e0%b8%87-sql-%e0%b9%80%e0%b8%9b%e0%b9%87%e0%b8%99-code-asp/</guid>
		<description><![CDATA[เนื่องจากอย่างว่าตอนนี้ต้องเขียน SQL Script เยอะกว่าสมัยก่อนตอนหัดเขียนโปรแกรมใหม่ๆ แล้ว Code SQL มันก้อยาวมาก หลังจากนั้นไม่พอ ยังต้องเอามาแปะใน ASP อีกต่างหาก ปัญหาก็คือ มันไม่ใช่ว่าจะวางแล้ว Assign ค่าใส่ตัวแปลที่เป็น String ได้เลยเสียเมื่อไหร่ เพราะถ้า copy ล่ะก็มันก็จะขึ้นบรรทัดใหม่ มันก่อให้เกิด Error ขึ้นมา เลยต้องมาต่อตัวแปล String ทีละบรรทัด แล้วถ้าเขียน SQL Script เป็น 50 บรรทัดไม่หน้ามืดเลยเหรอ นั่นแหละครับ ประเด็น ผมเลยเขียนโปรแกรมง๊ายง่าย ขึ้นมาอันนึง เพื่อทำขั้นตอนนี้ให้เราแทน (มันง่ายๆจริงๆ นะ แต่ถ้ามีหลายบรรทัดแล้วจะยิ้มเลยล่ะ) ลองโหลดไปใช้งานกันดูนะครับ Make ASP SQL Statement ใครลองโหลดไปเล่น เสนอไอเดียทำต่อได้เลยนะครับ]]></description>
			<content:encoded><![CDATA[<p>เนื่องจากอย่างว่าตอนนี้ต้องเขียน SQL Script เยอะกว่าสมัยก่อนตอนหัดเขียนโปรแกรมใหม่ๆ แล้ว Code SQL มันก้อยาวมาก หลังจากนั้นไม่พอ ยังต้องเอามาแปะใน ASP อีกต่างหาก ปัญหาก็คือ มันไม่ใช่ว่าจะวางแล้ว Assign ค่าใส่ตัวแปลที่เป็น String ได้เลยเสียเมื่อไหร่ เพราะถ้า copy ล่ะก็มันก็จะขึ้นบรรทัดใหม่ มันก่อให้เกิด Error ขึ้นมา เลยต้องมาต่อตัวแปล String ทีละบรรทัด แล้วถ้าเขียน SQL Script เป็น 50 บรรทัดไม่หน้ามืดเลยเหรอ</p>
<p>นั่นแหละครับ ประเด็น ผมเลยเขียนโปรแกรมง๊ายง่าย ขึ้นมาอันนึง เพื่อทำขั้นตอนนี้ให้เราแทน (มันง่ายๆจริงๆ นะ แต่ถ้ามีหลายบรรทัดแล้วจะยิ้มเลยล่ะ) ลองโหลดไปใช้งานกันดูนะครับ</p>
<p><a href="http://www.nop.in.th/wp-content/uploads/2008/07/makesqlstatement.zip">Make ASP SQL Statement</a></p>
<p>ใครลองโหลดไปเล่น เสนอไอเดียทำต่อได้เลยนะครับ</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fsql-to-asp%2F&amp;submitHeadline=%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%81%E0%B8%81%E0%B8%A3%E0%B8%A1+%E0%B9%81%E0%B8%9B%E0%B8%A5%E0%B8%87+SQL+%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99+Code+ASP&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fsql-to-asp%2F&amp;title=%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%81%E0%B8%81%E0%B8%A3%E0%B8%A1+%E0%B9%81%E0%B8%9B%E0%B8%A5%E0%B8%87+SQL+%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99+Code+ASP" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fsql-to-asp%2F&amp;title=%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%81%E0%B8%81%E0%B8%A3%E0%B8%A1+%E0%B9%81%E0%B8%9B%E0%B8%A5%E0%B8%87+SQL+%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99+Code+ASP" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fsql-to-asp%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fsql-to-asp%2F&amp;title=%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%81%E0%B8%81%E0%B8%A3%E0%B8%A1+%E0%B9%81%E0%B8%9B%E0%B8%A5%E0%B8%87+SQL+%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99+Code+ASP" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fsql-to-asp%2F&amp;title=%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%81%E0%B8%81%E0%B8%A3%E0%B8%A1+%E0%B9%81%E0%B8%9B%E0%B8%A5%E0%B8%87+SQL+%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99+Code+ASP" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fsql-to-asp%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%81%E0%B8%81%E0%B8%A3%E0%B8%A1+%E0%B9%81%E0%B8%9B%E0%B8%A5%E0%B8%87+SQL+%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99+Code+ASP+@+http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fsql-to-asp%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.nop.in.th/asp-active-server-page/sql-to-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>อัพโหลด แล้วเจอ Error: Request object error &#8216;ASP 0104 : 80004005&#8242; Operation not Allowed</title>
		<link>http://www.nop.in.th/asp-active-server-page/error-request-object-error-asp-0104-80004005/</link>
		<comments>http://www.nop.in.th/asp-active-server-page/error-request-object-error-asp-0104-80004005/#comments</comments>
		<pubDate>Tue, 13 May 2008 18:48:57 +0000</pubDate>
		<dc:creator>นพ</dc:creator>
				<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://www.nop.in.th/?p=258</guid>
		<description><![CDATA[Error: Request object error &#8216;ASP 0104 : 80004005&#8242; Operation not Allowed Error นี้ เกิดจาก การอัพโหลดไฟล์เกิน 200Kb ซึ่งเกิดจากการ Config ใน Metabase.xml ซึ่ง ถ้าจะแก้ไขให้ไปหาไหล์ Metabase.xml ใน folder C:\Windows\System32\Inetsrv ซึ่ง หา บรรทัดนี้ AspMaxRequestEntityAllowed แล้วเพิ่มตัวเลขข้างหลังตามต้องการ]]></description>
			<content:encoded><![CDATA[<p>Error: Request object error &#8216;ASP 0104 : 80004005&#8242; Operation not Allowed</p>
<p>Error นี้ เกิดจาก การอัพโหลดไฟล์เกิน 200Kb ซึ่งเกิดจากการ Config ใน Metabase.xml ซึ่ง ถ้าจะแก้ไขให้ไปหาไหล์ Metabase.xml ใน folder C:\Windows\System32\Inetsrv ซึ่ง หา บรรทัดนี้</p>
<p>AspMaxRequestEntityAllowed</p>
<p>แล้วเพิ่มตัวเลขข้างหลังตามต้องการ</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ferror-request-object-error-asp-0104-80004005%2F&amp;submitHeadline=%E0%B8%AD%E0%B8%B1%E0%B8%9E%E0%B9%82%E0%B8%AB%E0%B8%A5%E0%B8%94+%E0%B9%81%E0%B8%A5%E0%B9%89%E0%B8%A7%E0%B9%80%E0%B8%88%E0%B8%AD+Error%3A+Request+object+error+%26%238216%3BASP+0104+%3A+80004005%26%238242%3B+Operation+not+Allowed&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ferror-request-object-error-asp-0104-80004005%2F&amp;title=%E0%B8%AD%E0%B8%B1%E0%B8%9E%E0%B9%82%E0%B8%AB%E0%B8%A5%E0%B8%94+%E0%B9%81%E0%B8%A5%E0%B9%89%E0%B8%A7%E0%B9%80%E0%B8%88%E0%B8%AD+Error%3A+Request+object+error+%26%238216%3BASP+0104+%3A+80004005%26%238242%3B+Operation+not+Allowed" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ferror-request-object-error-asp-0104-80004005%2F&amp;title=%E0%B8%AD%E0%B8%B1%E0%B8%9E%E0%B9%82%E0%B8%AB%E0%B8%A5%E0%B8%94+%E0%B9%81%E0%B8%A5%E0%B9%89%E0%B8%A7%E0%B9%80%E0%B8%88%E0%B8%AD+Error%3A+Request+object+error+%26%238216%3BASP+0104+%3A+80004005%26%238242%3B+Operation+not+Allowed" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ferror-request-object-error-asp-0104-80004005%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ferror-request-object-error-asp-0104-80004005%2F&amp;title=%E0%B8%AD%E0%B8%B1%E0%B8%9E%E0%B9%82%E0%B8%AB%E0%B8%A5%E0%B8%94+%E0%B9%81%E0%B8%A5%E0%B9%89%E0%B8%A7%E0%B9%80%E0%B8%88%E0%B8%AD+Error%3A+Request+object+error+%26%238216%3BASP+0104+%3A+80004005%26%238242%3B+Operation+not+Allowed" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ferror-request-object-error-asp-0104-80004005%2F&amp;title=%E0%B8%AD%E0%B8%B1%E0%B8%9E%E0%B9%82%E0%B8%AB%E0%B8%A5%E0%B8%94+%E0%B9%81%E0%B8%A5%E0%B9%89%E0%B8%A7%E0%B9%80%E0%B8%88%E0%B8%AD+Error%3A+Request+object+error+%26%238216%3BASP+0104+%3A+80004005%26%238242%3B+Operation+not+Allowed" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ferror-request-object-error-asp-0104-80004005%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+%E0%B8%AD%E0%B8%B1%E0%B8%9E%E0%B9%82%E0%B8%AB%E0%B8%A5%E0%B8%94+%E0%B9%81%E0%B8%A5%E0%B9%89%E0%B8%A7%E0%B9%80%E0%B8%88%E0%B8%AD+Error%3A+Request+object+error+%26%238216%3BASP+0104+%3A+80004005%26%238242%3B+Operation+not+Allowed+@+http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ferror-request-object-error-asp-0104-80004005%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.nop.in.th/asp-active-server-page/error-request-object-error-asp-0104-80004005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การเขียน QueryString อัตโนมัติ ด้วย ASP</title>
		<link>http://www.nop.in.th/asp-active-server-page/asp-auto-querystring/</link>
		<comments>http://www.nop.in.th/asp-active-server-page/asp-auto-querystring/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 08:47:02 +0000</pubDate>
		<dc:creator>นพ</dc:creator>
				<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://www.nop.in.th/?p=255</guid>
		<description><![CDATA[การเขียน QueryString อัตโนมัติ ด้วย ASP คงมีบางคนอยากสร้าง QueryString แบบอัตโนมัิติบ้าง เพราะไม่เช่นนั้นต้องมาดูตัวแปลตั้งหมดแล้วเขียนเขียนมาเองทั้งหมดผมว่ามันลำบากเกินไป อันนี้เป็น Function ที่สำหรับสร้าง QueryString แบบ อัตโนมัติ โดยส่งเพียงค่า Parameter สำหรับชื่อตัวแปลที่ไม่ต้องการให้ทำการสร้าง QueryString ใน Function (กรณีเช่น การส่งหน้า ซึ่งจะส่งค่าเปลี่ยนไปทุกๆ หน้าไม่ Fix ตายตัว) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 function makeQueryString&#40;var_dynparam&#41; if request.ServerVariables&#40;&#34;REQUEST_METHOD&#34;&#41; = &#34;POST&#34; then for each variable_name [...]]]></description>
			<content:encoded><![CDATA[<p>การเขียน QueryString อัตโนมัติ ด้วย ASP</p>
<p>คงมีบางคนอยากสร้าง QueryString แบบอัตโนมัิติบ้าง เพราะไม่เช่นนั้นต้องมาดูตัวแปลตั้งหมดแล้วเขียนเขียนมาเองทั้งหมดผมว่ามันลำบากเกินไป อันนี้เป็น Function ที่สำหรับสร้าง QueryString แบบ อัตโนมัติ โดยส่งเพียงค่า Parameter สำหรับชื่อตัวแปลที่ไม่ต้องการให้ทำการสร้าง QueryString ใน Function (กรณีเช่น การส่งหน้า ซึ่งจะส่งค่าเปลี่ยนไปทุกๆ หน้าไม่ Fix ตายตัว)</p>

<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
17
18
</pre></td><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #0000ff; font-weight: bold;">function</span> makeQueryString<span style="color: #006600; font-weight:bold;">&#40;</span>var_dynparam<span style="color: #006600; font-weight:bold;">&#41;</span>
<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;REQUEST_METHOD&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;POST&quot;</span> <span style="color: #990099; font-weight: bold;">then</span>
<span style="color: #990099; font-weight: bold;">for</span> <span style="color: #990099; font-weight: bold;">each</span> variable_name <span style="color: #990099; font-weight: bold;">in</span> <span style="color: #990099; font-weight: bold;">request</span>.<span style="color: #330066;">form</span>
variablevalue<span style="color: #006600; font-weight: bold;">=</span><span style="color: #990099; font-weight: bold;">request</span>.<span style="color: #330066;">form</span><span style="color: #006600; font-weight:bold;">&#40;</span>variable_name<span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">if</span> variable_name <span style="color: #006600; font-weight: bold;">&amp;</span>lt<span style="color: #006600; font-weight: bold;">;&amp;</span>gt<span style="color: #006600; font-weight: bold;">;</span> var_dynparam <span style="color: #990099; font-weight: bold;">then</span>
a <span style="color: #006600; font-weight: bold;">=</span>  a<span style="color: #006600; font-weight: bold;">&amp;</span>amp<span style="color: #006600; font-weight: bold;">;</span><span style="color: #cc0000;">&quot;&amp;amp;&quot;</span><span style="color: #006600; font-weight: bold;">&amp;</span>amp<span style="color: #006600; font-weight: bold;">;</span>variable_name <span style="color: #006600; font-weight: bold;">&amp;</span>amp<span style="color: #006600; font-weight: bold;">;</span><span style="color: #cc0000;">&quot;=&quot;</span><span style="color: #006600; font-weight: bold;">&amp;</span>amp<span style="color: #006600; font-weight: bold;">;</span>variable_value
<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;">else</span>
<span style="color: #990099; font-weight: bold;">for</span> <span style="color: #990099; font-weight: bold;">each</span> variable_name <span style="color: #990099; font-weight: bold;">in</span> <span style="color: #990099; font-weight: bold;">request</span>.<span style="color: #330066;">querystring</span>
variablevalue<span style="color: #006600; font-weight: bold;">=</span><span style="color: #990099; font-weight: bold;">request</span>.<span style="color: #330066;">querystring</span><span style="color: #006600; font-weight:bold;">&#40;</span>variable_name<span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">if</span> variable_name <span style="color: #006600; font-weight: bold;">&amp;</span>lt<span style="color: #006600; font-weight: bold;">;&amp;</span>gt<span style="color: #006600; font-weight: bold;">;</span> var_dynparam <span style="color: #990099; font-weight: bold;">then</span>
a <span style="color: #006600; font-weight: bold;">=</span>  a<span style="color: #006600; font-weight: bold;">&amp;</span>amp<span style="color: #006600; font-weight: bold;">;</span><span style="color: #cc0000;">&quot;&amp;amp;&quot;</span><span style="color: #006600; font-weight: bold;">&amp;</span>amp<span style="color: #006600; font-weight: bold;">;</span>variable_name <span style="color: #006600; font-weight: bold;">&amp;</span>amp<span style="color: #006600; font-weight: bold;">;</span><span style="color: #cc0000;">&quot;=&quot;</span><span style="color: #006600; font-weight: bold;">&amp;</span>amp<span style="color: #006600; font-weight: bold;">;</span>variable_value
<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: #990099; font-weight: bold;">if</span>
makeQueryString <span style="color: #006600; font-weight: bold;">=</span> a
<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #0000ff; font-weight: bold;">function</span></pre></td></tr></table></div>

<p>วิธีเรียกใช้</p>
<p><span id="more-143"></span></p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&amp;</span>lt<span style="color: #006600; font-weight: bold;">;%</span>
qstring <span style="color: #006600; font-weight: bold;">=</span> makeQueryString<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;pageno&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #006600; font-weight: bold;">&lt;</span>a href<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;index.asp?pageno=1&amp;lt;%=qstring%&amp;gt;&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>หน้าถัดไป<span style="color: #006600; font-weight: bold;">&lt;/</span>a<span style="color: #006600; font-weight: bold;">&gt;</span>
<span style="color: #006600; font-weight: bold;">%&amp;</span>gt<span style="color: #006600; font-weight: bold;">;</span></pre></div></div>

<p>อ่านแล้วงง Post ถามไ้ว้ได้ครับ</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fasp-auto-querystring%2F&amp;submitHeadline=%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99+QueryString+%E0%B8%AD%E0%B8%B1%E0%B8%95%E0%B9%82%E0%B8%99%E0%B8%A1%E0%B8%B1%E0%B8%95%E0%B8%B4+%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2+ASP&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fasp-auto-querystring%2F&amp;title=%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99+QueryString+%E0%B8%AD%E0%B8%B1%E0%B8%95%E0%B9%82%E0%B8%99%E0%B8%A1%E0%B8%B1%E0%B8%95%E0%B8%B4+%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2+ASP" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fasp-auto-querystring%2F&amp;title=%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99+QueryString+%E0%B8%AD%E0%B8%B1%E0%B8%95%E0%B9%82%E0%B8%99%E0%B8%A1%E0%B8%B1%E0%B8%95%E0%B8%B4+%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2+ASP" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fasp-auto-querystring%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fasp-auto-querystring%2F&amp;title=%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99+QueryString+%E0%B8%AD%E0%B8%B1%E0%B8%95%E0%B9%82%E0%B8%99%E0%B8%A1%E0%B8%B1%E0%B8%95%E0%B8%B4+%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2+ASP" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fasp-auto-querystring%2F&amp;title=%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99+QueryString+%E0%B8%AD%E0%B8%B1%E0%B8%95%E0%B9%82%E0%B8%99%E0%B8%A1%E0%B8%B1%E0%B8%95%E0%B8%B4+%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2+ASP" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fasp-auto-querystring%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99+QueryString+%E0%B8%AD%E0%B8%B1%E0%B8%95%E0%B9%82%E0%B8%99%E0%B8%A1%E0%B8%B1%E0%B8%95%E0%B8%B4+%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2+ASP+@+http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fasp-auto-querystring%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.nop.in.th/asp-active-server-page/asp-auto-querystring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Real IP Address with ASP</title>
		<link>http://www.nop.in.th/asp-active-server-page/get-real-ip-address-with-asp/</link>
		<comments>http://www.nop.in.th/asp-active-server-page/get-real-ip-address-with-asp/#comments</comments>
		<pubDate>Mon, 02 Apr 2007 13:08:11 +0000</pubDate>
		<dc:creator>นพ</dc:creator>
				<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://www.nop.in.th/?p=42</guid>
		<description><![CDATA[Whenever a browser sends a request for a page, it also sends a number of other headers to the script, containing information such as the browser type. It also includes information such as the visitors IP address. This can be particularly useful when creating an online security scan, or logging their IP address in an [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever a browser sends a request for a page, it also sends a number of other headers to the script, containing information such as the browser type. It also includes information such as the visitors IP address. This can be particularly useful when creating an online security scan, or logging their IP address in an online forum.</p>
<p>There are two server variables of interest; <code>REMOTE_ADDR</code> and <code>HTTP_X_FORWARDED_FOR</code>. As many visitors access the internet via a third party (ie their ISP), <code>REMOTE_ADDR</code> does not always contain their IP address&#8230; it contains their ISP&#8217;s address. If this is the case, most browsers then store the users IP address in the <code>HTTP_X_FORWARDED_FOR</code> variable. So, first, we check <code>HTTP_X_FORWARDED_FOR</code>, and then if that is empty, we try <code>REMOTE_ADDR</code> instead:</p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">Dim</span> sIPAddress
&nbsp;
sIPAddress <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>
&nbsp;
<span style="color: #990099; font-weight: bold;">If</span> sIPAddress<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;&quot;</span> <span style="color: #990099; font-weight: bold;">Then</span> sIPAddress <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></pre></div></div>

<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fget-real-ip-address-with-asp%2F&amp;submitHeadline=Get+Real+IP+Address+with+ASP&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fget-real-ip-address-with-asp%2F&amp;title=Get+Real+IP+Address+with+ASP" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fget-real-ip-address-with-asp%2F&amp;title=Get+Real+IP+Address+with+ASP" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fget-real-ip-address-with-asp%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fget-real-ip-address-with-asp%2F&amp;title=Get+Real+IP+Address+with+ASP" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fget-real-ip-address-with-asp%2F&amp;title=Get+Real+IP+Address+with+ASP" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fget-real-ip-address-with-asp%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Get+Real+IP+Address+with+ASP+@+http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Fget-real-ip-address-with-asp%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.nop.in.th/asp-active-server-page/get-real-ip-address-with-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Function Ceiling หรือ Floor สำหรับ ASP</title>
		<link>http://www.nop.in.th/asp-active-server-page/function-ceiling-%e0%b8%ab%e0%b8%a3%e0%b8%b7%e0%b8%ad-floor-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-asp/</link>
		<comments>http://www.nop.in.th/asp-active-server-page/function-ceiling-%e0%b8%ab%e0%b8%a3%e0%b8%b7%e0%b8%ad-floor-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-asp/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 07:25:21 +0000</pubDate>
		<dc:creator>นพ</dc:creator>
				<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://www.nop.in.th/?p=11</guid>
		<description><![CDATA[เนื่องจาก ASP Classic ไม่มี function Ceiling หรือ Floor สำหรับ การปัดเศษขึ้นลง ซึ่งถือว่ามีความจำเป็นมาก เลยเก็บมาไว้ให้ดูกันครับ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 Function Ceiling&#40;byval n&#41; Dim iTmp, [...]]]></description>
			<content:encoded><![CDATA[<p>เนื่องจาก ASP Classic ไม่มี function Ceiling หรือ Floor สำหรับ การปัดเศษขึ้นลง ซึ่งถือว่ามีความจำเป็นมาก เลยเก็บมาไว้ให้ดูกันครับ</p>

<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
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #0000ff; font-weight: bold;">Function</span> Ceiling<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">byval</span> n<span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">Dim</span> iTmp, bErr, f
<span style="color: #990099; font-weight: bold;">on</span> <span style="color: #990099; font-weight: bold;">error</span> <span style="color: #990099; font-weight: bold;">resume</span> <span style="color: #990099; font-weight: bold;">next</span>
n <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">cdbl</span><span style="color: #006600; font-weight:bold;">&#40;</span>n<span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">if</span> err <span style="color: #990099; font-weight: bold;">then</span> bErr <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">true</span>
<span style="color: #990099; font-weight: bold;">on</span> <span style="color: #990099; font-weight: bold;">error</span> <span style="color: #990099; font-weight: bold;">goto</span> <span style="color: #800000;">0</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">if</span> bErr <span style="color: #990099; font-weight: bold;">then</span> Err.<span style="color: #9900cc;">Raise</span> <span style="color: #800000;">5000</span>, <span style="color: #cc0000;">&quot;Ceiling Function&quot;</span>, _
<span style="color: #cc0000;">&quot;Input must be convertible to a sub-type of double&quot;</span>
&nbsp;
f <span style="color: #006600; font-weight: bold;">=</span> Floor<span style="color: #006600; font-weight:bold;">&#40;</span>n<span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">if</span> f <span style="color: #006600; font-weight: bold;">=</span> n <span style="color: #990099; font-weight: bold;">then</span>
Ceiling <span style="color: #006600; font-weight: bold;">=</span> n
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>
Ceiling <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">cInt</span><span style="color: #006600; font-weight:bold;">&#40;</span>f + <span style="color: #800000;">1</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>
&nbsp;
<span style="color: #0000ff; font-weight: bold;">Function</span> Floor<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #990099; font-weight: bold;">byval</span> n<span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">Dim</span> iTmp, bErr
&nbsp;
<span style="color: #990099; font-weight: bold;">on</span> <span style="color: #990099; font-weight: bold;">error</span> <span style="color: #990099; font-weight: bold;">resume</span> <span style="color: #990099; font-weight: bold;">next</span>
n <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">cdbl</span><span style="color: #006600; font-weight:bold;">&#40;</span>n<span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">if</span> err <span style="color: #990099; font-weight: bold;">then</span> bErr <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">true</span>
<span style="color: #990099; font-weight: bold;">on</span> <span style="color: #990099; font-weight: bold;">error</span> <span style="color: #990099; font-weight: bold;">goto</span> <span style="color: #800000;">0</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">if</span> bErr <span style="color: #990099; font-weight: bold;">then</span> Err.<span style="color: #9900cc;">Raise</span> <span style="color: #800000;">5000</span>, <span style="color: #cc0000;">&quot;Floor Function&quot;</span>, _
<span style="color: #cc0000;">&quot;Input must be convertible to a sub-type of double&quot;</span>
&nbsp;
<span style="color: #008000;">'Round() rounds up</span>
iTmp <span style="color: #006600; font-weight: bold;">=</span> Round<span style="color: #006600; font-weight:bold;">&#40;</span>n<span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color: #008000;">'test rounded value against the non rounded value</span>
<span style="color: #008000;">'if greater, subtract 1</span>
<span style="color: #990099; font-weight: bold;">if</span> iTmp <span style="color: #006600; font-weight: bold;">&amp;</span>gt<span style="color: #006600; font-weight: bold;">;</span> n <span style="color: #990099; font-weight: bold;">then</span> iTmp <span style="color: #006600; font-weight: bold;">=</span> iTmp - <span style="color: #800000;">1</span>
&nbsp;
Floor <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">cInt</span><span style="color: #006600; font-weight:bold;">&#40;</span>iTmp<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>

<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ffunction-ceiling-%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b7%25e0%25b8%25ad-floor-%25e0%25b8%25aa%25e0%25b8%25b3%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b1%25e0%25b8%259a-asp%2F&amp;submitHeadline=Function+Ceiling+%E0%B8%AB%E0%B8%A3%E0%B8%B7%E0%B8%AD+Floor+%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A+ASP&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ffunction-ceiling-%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b7%25e0%25b8%25ad-floor-%25e0%25b8%25aa%25e0%25b8%25b3%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b1%25e0%25b8%259a-asp%2F&amp;title=Function+Ceiling+%E0%B8%AB%E0%B8%A3%E0%B8%B7%E0%B8%AD+Floor+%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A+ASP" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ffunction-ceiling-%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b7%25e0%25b8%25ad-floor-%25e0%25b8%25aa%25e0%25b8%25b3%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b1%25e0%25b8%259a-asp%2F&amp;title=Function+Ceiling+%E0%B8%AB%E0%B8%A3%E0%B8%B7%E0%B8%AD+Floor+%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A+ASP" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ffunction-ceiling-%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b7%25e0%25b8%25ad-floor-%25e0%25b8%25aa%25e0%25b8%25b3%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b1%25e0%25b8%259a-asp%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ffunction-ceiling-%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b7%25e0%25b8%25ad-floor-%25e0%25b8%25aa%25e0%25b8%25b3%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b1%25e0%25b8%259a-asp%2F&amp;title=Function+Ceiling+%E0%B8%AB%E0%B8%A3%E0%B8%B7%E0%B8%AD+Floor+%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A+ASP" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ffunction-ceiling-%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b7%25e0%25b8%25ad-floor-%25e0%25b8%25aa%25e0%25b8%25b3%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b1%25e0%25b8%259a-asp%2F&amp;title=Function+Ceiling+%E0%B8%AB%E0%B8%A3%E0%B8%B7%E0%B8%AD+Floor+%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A+ASP" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ffunction-ceiling-%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b7%25e0%25b8%25ad-floor-%25e0%25b8%25aa%25e0%25b8%25b3%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b1%25e0%25b8%259a-asp%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Function+Ceiling+%E0%B8%AB%E0%B8%A3%E0%B8%B7%E0%B8%AD+Floor+%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A+ASP+@+http%3A%2F%2Fwww.nop.in.th%2Fasp-active-server-page%2Ffunction-ceiling-%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b7%25e0%25b8%25ad-floor-%25e0%25b8%25aa%25e0%25b8%25b3%25e0%25b8%25ab%25e0%25b8%25a3%25e0%25b8%25b1%25e0%25b8%259a-asp%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.nop.in.th/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.nop.in.th/asp-active-server-page/function-ceiling-%e0%b8%ab%e0%b8%a3%e0%b8%b7%e0%b8%ad-floor-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
