<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7922643041724802726</id><updated>2011-11-27T16:15:57.921-08:00</updated><title type='text'>ASP Tutorial</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-9051119368128826268</id><published>2008-09-22T04:19:00.002-07:00</published><updated>2008-09-22T04:20:12.967-07:00</updated><title type='text'>ASP Content Rotator (ASP 3.0)</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_contentrotator" target="_blank"&gt;The&lt;br /&gt;Content Rotator Component&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This component displays a different HTML content string each time a user visits&lt;br /&gt;or refreshes the page.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;ASP Content Rotator Component&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASP Content Rotator component creates a ContentRotator&lt;br /&gt;object that displays a different HTML content string each time a user enters or&lt;br /&gt;refreshes a page. A text file, called the Content Schedule File, includes the&lt;br /&gt;information about the content strings.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The content strings can contain HTML tags so you can display&lt;br /&gt;any type of content that HTML can represent: text, images, colors, or&lt;br /&gt;hyperlinks.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Syntax&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        Set cr=Server.CreateObject( &amp;quot;MSWC.ContentRotator&amp;quot; )&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The following example displays a different content each time a&lt;br /&gt;user views the Web page. Create a text file named &amp;quot;textads.txt&amp;quot; in&lt;br /&gt;your default Web Site folder, in a subfolder called text.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&amp;quot;textads.txt&amp;quot;:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;%% #1&lt;br&gt;&lt;br /&gt;        This is a great day!!&lt;br&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        %% #2&lt;br&gt;&lt;br /&gt;        &amp;lt;h1&amp;gt;Smile&amp;lt;/h1&amp;gt;&lt;br&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        %% #3&lt;br&gt;&lt;br /&gt;        &amp;lt;img src=&amp;quot;smiley.gif&amp;quot;&amp;gt;&lt;br&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        %% #4&lt;br&gt;&lt;br /&gt;        Here's a &amp;lt;a&lt;br /&gt;        href=&amp;quot;http://www.w3schools.com&amp;quot;&amp;gt;link.&amp;lt;/a&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Notice the #number at the beginning of each content string.&lt;br /&gt;This number is an optional parameter that indicates the relative weight of the&lt;br /&gt;HTML content string. In this example, the Content Rotator will display the first&lt;br /&gt;content string one-tenth of the time, the second string two-tenths of the time,&lt;br /&gt;the third string three-tenths of the time, and the fourth string four-tenths of&lt;br /&gt;the time.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Then, create an ASP file, and insert the following code:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br&gt;&lt;br /&gt;        &amp;lt;body&amp;gt;&lt;br&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        &amp;lt;%&lt;br&gt;&lt;br /&gt;        set cr=server.createobject(&amp;quot;MSWC.ContentRotator&amp;quot;)&lt;br&gt;&lt;br /&gt;        response.write(cr.ChooseContent(&amp;quot;text/textads.txt&amp;quot;))&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;br&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        &amp;lt;/body&amp;gt;&lt;br&gt;&lt;br /&gt;        &amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASP Content Rotator Component's methods are described&lt;br /&gt;below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="15%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="35%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="50%"&gt;&lt;font size="1"&gt;Example&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;ChooseContent&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Gets and displays a content string&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim cr&lt;br&gt;&lt;br /&gt;        Set cr=Server.CreateObject(&amp;quot;MSWC.ContentRotator&amp;quot;)&lt;br&gt;&lt;br /&gt;        response.write(cr.ChooseContent(&amp;quot;text/textads.txt&amp;quot;))&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Output:&lt;br&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        &lt;img alt="Smiley" src="http://www.w3schools.com/ASP/smiley.gif" border="0" width="32" height="32"&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;GetAllContent&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Retrieves and displays all of the content strings in&lt;br /&gt;        the text file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim cr&lt;br&gt;&lt;br /&gt;        Set cr=Server.CreateObject(&amp;quot;MSWC.ContentRotator&amp;quot;)&lt;br&gt;&lt;br /&gt;        response.write(cr.GetAllContent(&amp;quot;text/textads.txt&amp;quot;))&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Output:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;hr&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;This is a great day!!&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;hr&gt;&lt;br /&gt;        &lt;h1&gt;&lt;font size="1"&gt;Smile&lt;/font&gt;&lt;/h1&gt;&lt;br /&gt;        &lt;hr&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;&lt;img alt="Smiley" src="http://www.w3schools.com/ASP/smiley.gif" width="32" height="32"&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;hr&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Here's a &lt;a href="http://www.w3schools.com"&gt;link.&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;hr&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-9051119368128826268?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/9051119368128826268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=9051119368128826268' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/9051119368128826268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/9051119368128826268'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-content-rotator-asp-30.html' title='ASP Content Rotator (ASP 3.0)'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-7958799438360839581</id><published>2008-09-22T04:19:00.001-07:00</published><updated>2008-09-22T04:19:42.255-07:00</updated><title type='text'>ASP Content Linking Component</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_contentlinking" target="_blank"&gt;The&lt;br /&gt;Content Linking Component&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example builds a table of contents.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_contentlinking2" target="_blank"&gt;The&lt;br /&gt;Content Linking Component 2&lt;/a&gt;&lt;br&gt;&lt;br /&gt;The example uses the Content Linking Component to navigate between the pages in&lt;br /&gt;a text file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;ASP Content Linking Component&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASP Content Linking component is used to create a quick&lt;br /&gt;and easy navigation system!&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Content Linking component returns a Nextlink object that&lt;br /&gt;is used to hold a list of Web pages to be navigated.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Syntax&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        Set nl=Server.CreateObject( &amp;quot;MSWC.NextLink&amp;quot; )&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;First we create a text file - &amp;quot;links.txt&amp;quot;. This file&lt;br /&gt;contains the pages to be navigated. The pages must be listed in the same order&lt;br /&gt;you want them to be displayed, and it also must contain a description for each&lt;br /&gt;file name (use the tab key to separate file name from description). &lt;b&gt;Note:&lt;/b&gt;&lt;br /&gt;If you want to add a page to the list or change the order of the pages in the&lt;br /&gt;list; all you have to do is to modify the text file! The navigation will&lt;br /&gt;automatically be correct!&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&amp;quot;links.txt&amp;quot;:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;asp_intro.asp ASP Intro&lt;br&gt;&lt;br /&gt;        asp_syntax.asp ASP Syntax&lt;br&gt;&lt;br /&gt;        asp_variables.asp ASP Variables&lt;br&gt;&lt;br /&gt;        asp_procedures.asp ASP Procedures&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;On each of the pages listed above, put one line of code:&lt;br /&gt;&amp;lt;!-- #include file=&amp;quot;nlcode.inc&amp;quot;--&amp;gt;. This line will include the&lt;br /&gt;code below on every page listed in &amp;quot;links.txt&amp;quot; and the navigation will&lt;br /&gt;work.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&amp;quot;nlcode.inc&amp;quot;:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;'Use the Content Linking Component &lt;br /&gt;'to navigate between the pages listed&lt;br /&gt;'in links.txt&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;dim nl&lt;br /&gt;Set nl=Server.CreateObject(&amp;quot;MSWC.NextLink&amp;quot;)&lt;br /&gt;if (nl.GetListIndex(&amp;quot;links.txt&amp;quot;)&amp;gt;1) then&lt;br /&gt;  Response.Write(&amp;quot;&amp;lt;a href='&amp;quot; &amp;amp; nl.GetPreviousURL(&amp;quot;links.txt&amp;quot;))&lt;br /&gt;  Response.Write(&amp;quot;'&amp;gt;Previous Page&amp;lt;/a&amp;gt;&amp;quot;)&lt;br /&gt;end if&lt;br /&gt;Response.Write(&amp;quot;&amp;lt;a href='&amp;quot; &amp;amp; nl.GetNextURL(&amp;quot;links.txt&amp;quot;))&lt;br /&gt;Response.Write(&amp;quot;'&amp;gt;Next Page&amp;lt;/a&amp;gt;&amp;quot;)&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASP Content Linking Component's methods are described&lt;br /&gt;below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="45%"&gt;&lt;font size="1"&gt;Example&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;GetListCount&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the number of items listed in the Content&lt;br /&gt;        Linking List file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim nl,c&lt;br&gt;&lt;br /&gt;        Set nl=Server.CreateObject(&amp;quot;MSWC.NextLink&amp;quot;)&lt;br&gt;&lt;br /&gt;        c=nl.GetListCount(&amp;quot;links.txt&amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;There are &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(c)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot; items in the list&amp;quot;)&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Output:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;There are 4 items in the list&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;GetListIndex&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the index number of the current item in the&lt;br /&gt;        Content Linking List file. The index number of the first item is 1. 0 is&lt;br /&gt;        returned if the current page is not in the Content Linking List file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim nl,c&lt;br&gt;&lt;br /&gt;        Set nl=Server.CreateObject(&amp;quot;MSWC.NextLink&amp;quot;)&lt;br&gt;&lt;br /&gt;        c=nl.GetListIndex(&amp;quot;links.txt&amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;Item number &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(c)&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Output:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Item number 3&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;GetNextDescription&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the text description of the next item listed in&lt;br /&gt;        the Content Linking List file. If the current page is not found in the&lt;br /&gt;        list file it returns the text description of the last page on the list&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim nl,c&lt;br&gt;&lt;br /&gt;        Set nl=Server.CreateObject(&amp;quot;MSWC.NextLink&amp;quot;)&lt;br&gt;&lt;br /&gt;        c=nl.GetNextDescription(&amp;quot;links.txt&amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;Next &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;description is: &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(c)&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Next description is: ASP Variables&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;GetNextURL&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the URL of the next item listed in the Content&lt;br /&gt;        Linking List file. If the current page is not found in the list file it&lt;br /&gt;        returns the URL of the last page on the list&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim nl,c&lt;br&gt;&lt;br /&gt;        Set nl=Server.CreateObject(&amp;quot;MSWC.NextLink&amp;quot;)&lt;br&gt;&lt;br /&gt;        c=nl.GetNextURL(&amp;quot;links.txt&amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;Next &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;URL is: &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(c)&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Next URL is: asp_variables.asp&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;GetNthDescription&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the description of the Nth page listed in the&lt;br /&gt;        Content Linking List file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim nl,c&lt;br&gt;&lt;br /&gt;        Set nl=Server.CreateObject(&amp;quot;MSWC.NextLink&amp;quot;)&lt;br&gt;&lt;br /&gt;        c=nl.GetNthDescription(&amp;quot;links.txt&amp;quot;,3)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;Third &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;description is: &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(c)&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Third description is: ASP Variables&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;GetNthURL&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the URL of the Nth page listed in the Content&lt;br /&gt;        Linking List file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim nl,c&lt;br&gt;&lt;br /&gt;        Set nl=Server.CreateObject(&amp;quot;MSWC.NextLink&amp;quot;)&lt;br&gt;&lt;br /&gt;        c=nl.GetNthURL(&amp;quot;links.txt&amp;quot;,3)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;Third &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;URL is: &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(c)&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Third URL is: asp_variables.asp&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;GetPreviousDescription&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the text description of the previous item&lt;br /&gt;        listed in the Content Linking List file. If the current page is not&lt;br /&gt;        found in the list file it returns the text description of the first page&lt;br /&gt;        on the list&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim nl,c&lt;br&gt;&lt;br /&gt;        Set nl=Server.CreateObject(&amp;quot;MSWC.NextLink&amp;quot;)&lt;br&gt;&lt;br /&gt;        c=nl.GetPreviousDescription(&amp;quot;links.txt&amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;Previous &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;description is: &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(c)&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Previous description is: ASP Variables&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;GetPreviousURL&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the URL of the previous item listed in the&lt;br /&gt;        Content Linking List file. If the current page is not found in the list&lt;br /&gt;        file it returns the URL of the first page on the list&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim nl,c&lt;br&gt;&lt;br /&gt;        Set nl=Server.CreateObject(&amp;quot;MSWC.NextLink&amp;quot;)&lt;br&gt;&lt;br /&gt;        c=nl.GetPreviousURL(&amp;quot;links.txt&amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;Previous &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(&amp;quot;URL is: &amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(c)&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Previous URL is: asp_variables.asp&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-7958799438360839581?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/7958799438360839581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=7958799438360839581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/7958799438360839581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/7958799438360839581'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-content-linking-component.html' title='ASP Content Linking Component'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-8724360175366777594</id><published>2008-09-22T04:18:00.000-07:00</published><updated>2008-09-22T04:19:04.129-07:00</updated><title type='text'>ASP Browser Capabilities Component</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_browsercap" target="_blank"&gt;The&lt;br /&gt;Browser Capabilities Component&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example shows how to determine the type, capabilities and version number of&lt;br /&gt;each browser visiting your site.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;ASP Browser Capabilities Component&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASP Browser Capabilities component creates a BrowserType&lt;br /&gt;object that determines the type, capabilities and version number of each browser&lt;br /&gt;that visits your site.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;When a browser connects to a server, an HTTP User Agent Header&lt;br /&gt;is also sent to the server. This header contains information about the browser&lt;br /&gt;(like browser type and version number). The BrowserType object then compares the&lt;br /&gt;information in the header with information in a file on the server called&lt;br /&gt;&amp;quot;Browscap.ini&amp;quot;.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If there is a match between the browser type and version&lt;br /&gt;number sent in the header and the information in the &amp;quot;Browsercap.ini&amp;quot;&lt;br /&gt;file, you can use the BrowserType object to list the properties of the matching&lt;br /&gt;browser. If there is no match for the browser type and version number in the&lt;br /&gt;Browscap.ini file, it will set every property to &amp;quot;UNKNOWN&amp;quot;.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Syntax&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        Set MyBrow=Server.CreateObject(&amp;quot;MSWC.BrowserType&amp;quot;)&amp;nbsp;&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The example below creates a BrowserType object in an ASP file,&lt;br /&gt;and displays a table showing some of the capabilities of the current browser:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Set MyBrow=Server.CreateObject(&amp;quot;MSWC.BrowserType&amp;quot;)&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;table border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;th&amp;gt;Client OS&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;th&amp;gt;&amp;lt;%=MyBrow.platform%&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td &amp;gt;Web Browser&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td &amp;gt;&amp;lt;%=MyBrow.browser%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;Browser version&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;%=MyBrow.version%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;Frame support?&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;%=MyBrow.frames%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;Table support?&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;%=MyBrow.tables%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;Sound support?&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;%=MyBrow.backgroundsounds%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;Cookies support?&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;%=MyBrow.cookies%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;VBScript support?&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;%=MyBrow.vbscript%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;JavaScript support?&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;%=MyBrow.javascript%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Output:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;th&gt;&lt;font size="1"&gt;Client OS&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th&gt;&lt;font size="1"&gt;WinNT&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Web Browser&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;IE&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Browser version&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;5.0&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Frame support?&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;True&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Table support?&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;True&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Sound support?&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;True&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Cookies support?&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;True&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;VBScript support?&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;True&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;JavaScript support?&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;True&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The Browscap.ini File&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The &amp;quot;Browsercap.ini&amp;quot; file is used to declare&lt;br /&gt;properties and to set default values for browsers.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;This section is not a tutorial on how to maintain&lt;br /&gt;&amp;quot;Browsercap.ini&amp;quot; files, it only shows you the basics; so you get an&lt;br /&gt;idea what a &amp;quot;Browsercap.ini&amp;quot; file is all about.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The &amp;quot;Browsercap.ini&amp;quot; file can contain the following:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;[;comments]&lt;br /&gt;[HTTPUserAgentHeader] &lt;br /&gt;[parent=browserDefinition]&lt;br /&gt;[property1=value1]&lt;br /&gt;[propertyN=valueN] &lt;br /&gt;[Default Browser Capability Settings]&lt;br /&gt;[defaultProperty1=defaultValue1]&lt;br /&gt;[defaultPropertyN=defaultValueN]&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left"&gt;&lt;font size="1"&gt;Parameter&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;comments&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Optional. Any line that starts with a semicolon are&lt;br /&gt;        ignored by the BrowserType object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;HTTPUserAgentHeader&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Optional. Specifies the HTTP User Agent header to&lt;br /&gt;        associate with the browser-property value statements specified in&lt;br /&gt;        propertyN. Wildcard characters are allowed&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;browserDefinition&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Optional. Specifies the HTTP User Agent header-string&lt;br /&gt;        of a browser to use as the parent browser. The current browser's&lt;br /&gt;        definition will inherit all of the property values declared in the&lt;br /&gt;        parent browser's definition&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;propertyN&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Optional. Specifies the browser properties. The&lt;br /&gt;        following table lists some possible properties:&lt;/font&gt;&lt;br /&gt;        &lt;ul&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;ActiveXControls - Support ActiveX® controls?&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Backgroundsounds - Support background sounds?&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Cdf - Support Channel Definition Format for&lt;br /&gt;            Webcasting?&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Tables - Support tables?&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Cookies - Support cookies?&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Frames - Support frames?&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Javaapplets - Support Java applets?&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Javascript - Supports JScript?&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Vbscript - Supports VBScript?&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Browser - Specifies the name of the browser&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Beta - Is the browser beta software?&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Platform - Specifies the platform that the browser&lt;br /&gt;            runs on&lt;/font&gt;&lt;br /&gt;          &lt;li&gt;&lt;font size="1"&gt;Version - Specifies the version number of the&lt;br /&gt;            browser&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;        &lt;/ul&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;valueN&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Optional. Specifies the value of propertyN. Can be a&lt;br /&gt;        string, an integer (prefix with #), or a Boolean value&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;defaultPropertyN&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Optional. Specifies the name of the browser property to&lt;br /&gt;        which to assign a default value if none of the defined&lt;br /&gt;        HTTPUserAgentHeader values match the HTTP User Agent header sent by the&lt;br /&gt;        browser&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;defaultValueN&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Optional. Specifies the value of defaultPropertyN. Can&lt;br /&gt;        be a string, an integer (prefix with #), or a Boolean value&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;A &amp;quot;Browsercap.ini&amp;quot; file might look something like&lt;br /&gt;this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;;IE 5.0&lt;br /&gt;[IE 5.0]&lt;br /&gt;browser=IE&lt;br /&gt;Version=5.0&lt;br /&gt;majorver=#5&lt;br /&gt;minorver=#0&lt;br /&gt;frames=TRUE&lt;br /&gt;tables=TRUE&lt;br /&gt;cookies=TRUE&lt;br /&gt;backgroundsounds=TRUE&lt;br /&gt;vbscript=TRUE&lt;br /&gt;javascript=TRUE&lt;br /&gt;javaapplets=TRUE&lt;br /&gt;ActiveXControls=TRUE&lt;br /&gt;beta=False&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;;DEFAULT BROWSER&lt;br /&gt;[*]&lt;br /&gt;browser=Default&lt;br /&gt;frames=FALSE &lt;br /&gt;tables=TRUE &lt;br /&gt;cookies=FALSE &lt;br /&gt;backgroundsounds=FALSE &lt;br /&gt;vbscript=FALSE &lt;br /&gt;javascript=FALSE&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-8724360175366777594?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/8724360175366777594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=8724360175366777594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/8724360175366777594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/8724360175366777594'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-browser-capabilities-component.html' title='ASP Browser Capabilities Component'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-4501331878578517560</id><published>2008-09-22T04:17:00.002-07:00</published><updated>2008-09-22T04:18:23.558-07:00</updated><title type='text'>ASP AdRotator Component</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_adrotator" target="_blank"&gt;Simple&lt;br /&gt;AdRotator Example&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example shows how to use the AdRotator component to display a different&lt;br /&gt;advertisement image, each time a user visits or refreshes the page.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_adrotator2" target="_blank"&gt;AdRotator&lt;br /&gt;- The Images are Hyperlinks&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example shows how to use the AdRotator component to display a different&lt;br /&gt;advertisement image, each time a user visits or refreshes the page. In addition,&lt;br /&gt;the images are hyperlinks.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;ASP AdRotator Component&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASP AdRotator component creates an AdRotator object that&lt;br /&gt;displays a different image each time a user enters or refreshes a page. A text&lt;br /&gt;file includes information about the images.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Syntax&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        set adrotator=server.createobject(&amp;quot;MSWC.AdRotator&amp;quot;)&lt;br&gt;&lt;br /&gt;        adrotator.GetAdvertisement(&amp;quot;textfile.txt&amp;quot;)&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Example&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Assume we have a file called &amp;quot;banners.asp&amp;quot;. It looks&lt;br /&gt;like this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br&gt;&lt;br /&gt;        &amp;lt;body&amp;gt;&lt;br&gt;&lt;br /&gt;        &amp;lt;%&lt;br&gt;&lt;br /&gt;        set adrotator=Server.CreateObject(&amp;quot;MSWC.AdRotator&amp;quot;)&lt;br&gt;&lt;br /&gt;        response.write(adrotator.GetAdvertisement(&amp;quot;ads.txt&amp;quot;))&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;br&gt;&lt;br /&gt;        &amp;lt;/body&amp;gt;&lt;br&gt;&lt;br /&gt;        &amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The file &amp;quot;ads.txt&amp;quot; looks like this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;*&lt;br&gt;&lt;br /&gt;        w3schools.gif&lt;br&gt;&lt;br /&gt;        http://www.w3schools.com/&lt;br&gt;&lt;br /&gt;        Visit W3Schools&lt;br&gt;&lt;br /&gt;        80&lt;br&gt;&lt;br /&gt;        microsoft.gif&lt;br&gt;&lt;br /&gt;        http://www.microsoft.com/&lt;br&gt;&lt;br /&gt;        Visit Microsoft&lt;br&gt;&lt;br /&gt;        20&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The lines below the asterisk in the file &amp;quot;ads.txt&amp;quot;&lt;br /&gt;specifies the images to be displayed, the hyperlink addresses, the alternate&lt;br /&gt;text (for the images), and the display rates in percent of the hits. We see that&lt;br /&gt;the W3Schools image will be displayed for 80 % of the hits and the Microsoft&lt;br /&gt;image will be displayed for 20 % of the hits in the text file above.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; To get the links to work when a user clicks on&lt;br /&gt;them, we will have to modify the file &amp;quot;ads.txt&amp;quot; a bit:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;REDIRECT banners.asp&lt;br&gt;&lt;br /&gt;        *&lt;br&gt;&lt;br /&gt;        w3schools.gif&lt;br&gt;&lt;br /&gt;        http://www.w3schools.com/&lt;br&gt;&lt;br /&gt;        Visit W3Schools&lt;br&gt;&lt;br /&gt;        80&lt;br&gt;&lt;br /&gt;        microsoft.gif&lt;br&gt;&lt;br /&gt;        http://www.microsoft.com/&lt;br&gt;&lt;br /&gt;        Visit Microsoft&lt;br&gt;&lt;br /&gt;        20&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The redirection page (banners.asp) will now receive a&lt;br /&gt;querystring with a variable named URL containing the URL to redirect to.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; To specify the height, width, and border of the&lt;br /&gt;image, you can insert the following lines under REDIRECT:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;REDIRECT banners.asp&lt;br&gt;&lt;br /&gt;        WIDTH 468&lt;br&gt;&lt;br /&gt;        HEIGHT 60&lt;br&gt;&lt;br /&gt;        BORDER 0&lt;br&gt;&lt;br /&gt;        *&lt;br&gt;&lt;br /&gt;        w3schools.gif&lt;br&gt;&lt;br /&gt;        ...&lt;br&gt;&lt;br /&gt;        ...&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The last thing to do is to add some lines of code to the&lt;br /&gt;&amp;quot;banners.asp&amp;quot; file:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        url=Request.QueryString(&amp;quot;url&amp;quot;)&lt;br&gt;&lt;br /&gt;        If url&amp;lt;&amp;gt;&amp;quot;&amp;quot; then Response.Redirect(url)&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br&gt;&lt;br /&gt;        &amp;lt;body&amp;gt;&lt;br&gt;&lt;br /&gt;        &amp;lt;%&lt;br&gt;&lt;br /&gt;        set adrotator=Server.CreateObject(&amp;quot;MSWC.AdRotator&amp;quot;)&lt;br&gt;&lt;br /&gt;        response.write(adrotator.GetAdvertisement(&amp;quot;textfile.txt&amp;quot;))&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;br&gt;&lt;br /&gt;        &amp;lt;/body&amp;gt;&lt;br&gt;&lt;br /&gt;        &amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;That's all!!&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="20%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="55%"&gt;&lt;font size="1"&gt;Example&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Border&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Specifies the size of the borders around the&lt;br /&gt;        advertisement&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        set adrot=Server.CreateObject(&amp;quot;MSWC.AdRotator&amp;quot;)&lt;br&gt;&lt;br /&gt;        adrot.Border=&amp;quot;2&amp;quot;&lt;br&gt;&lt;br /&gt;        Response.Write(adrot.GetAdvertisement(&amp;quot;ads.txt&amp;quot;))&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Clickable&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Specifies whether the advertisement is a hyperlink&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        set adrot=Server.CreateObject(&amp;quot;MSWC.AdRotator&amp;quot;)&lt;br&gt;&lt;br /&gt;        adrot.Clickable=false&lt;br&gt;&lt;br /&gt;        Response.Write(adrot.GetAdvertisement(&amp;quot;ads.txt&amp;quot;))&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;TargetFrame&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Name of the frame to display the&lt;br /&gt;        advertisement&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        set adrot=Server.CreateObject(&amp;quot;MSWC.AdRotator&amp;quot;)&lt;br&gt;&lt;br /&gt;        adrot.TargetFrame=&amp;quot;target='_blank'&amp;quot;&lt;br&gt;&lt;br /&gt;        Response.Write(adrot.GetAdvertisement(&amp;quot;ads.txt&amp;quot;))&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="20%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="55%"&gt;&lt;font size="1"&gt;Example&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;GetAdvertisement&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns HTML that displays the advertisement in the&lt;br /&gt;        page&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        set adrot=Server.CreateObject(&amp;quot;MSWC.AdRotator&amp;quot;)&lt;br&gt;&lt;br /&gt;        Response.Write(adrot.GetAdvertisement(&amp;quot;ads.txt&amp;quot;))&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-4501331878578517560?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/4501331878578517560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=4501331878578517560' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4501331878578517560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4501331878578517560'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-adrotator-component.html' title='ASP AdRotator Component'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-6156384953169116609</id><published>2008-09-22T04:17:00.001-07:00</published><updated>2008-09-22T04:17:51.839-07:00</updated><title type='text'>Introduction to ADO</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;ADO can be used to access databases from your&lt;br /&gt;web pages.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Accessing a Database from an ASP Page&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The common way to access a database from inside an ASP page is&lt;br /&gt;to:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Create an ADO connection to a database&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Open the database connection&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Create an ADO recordset&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Open the recordset&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Extract the data you need from the recordset&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Close the recordset&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Close the connection&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;What is ADO?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;ADO is a Microsoft technology&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;ADO stands for &lt;b&gt;A&lt;/b&gt;ctiveX &lt;b&gt;D&lt;/b&gt;ata &lt;b&gt;O&lt;/b&gt;bjects&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;ADO is a Microsoft Active-X component&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;ADO is automatically installed with Microsoft IIS&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;ADO is a programming interface to access data in a database&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Where to go next?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If you want to study more ADO, read our &lt;a href="http://www.w3schools.com/ado/default.asp"&gt;ADO&lt;br /&gt;tutorial&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-6156384953169116609?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/6156384953169116609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=6156384953169116609' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/6156384953169116609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/6156384953169116609'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/introduction-to-ado.html' title='Introduction to ADO'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-6166207526944904837</id><published>2008-09-22T04:16:00.000-07:00</published><updated>2008-09-22T04:17:19.111-07:00</updated><title type='text'>ASP Dictionary Object</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;The Dictionary object is used to store&lt;br /&gt;information in name/value pairs (referred to as key and item)&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_exists" target="_blank"&gt;Does&lt;br /&gt;a specified key exist?&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to first create a Dictionary object, and then use&lt;br /&gt;the Exists method to check if a specified key exists.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_items" target="_blank"&gt;Return&lt;br /&gt;an array of all items&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the Items method to return an array of all&lt;br /&gt;the items.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_keys" target="_blank"&gt;Return&lt;br /&gt;an array of all keys&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the Keys method to return an array of all&lt;br /&gt;the keys.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_item" target="_blank"&gt;Return&lt;br /&gt;the value of an item&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the Item property to return the value of an&lt;br /&gt;item.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_key" target="_blank"&gt;Set&lt;br /&gt;a key&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the Key property to set a key in a&lt;br /&gt;Dictionary object.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_count" target="_blank"&gt;Return&lt;br /&gt;the number of key/item pairs&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the Count property to return the number of&lt;br /&gt;key/item pairs.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The Dictionary Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Dictionary object is used to store information in&lt;br /&gt;name/value pairs (referred to as key and item). The Dictionary object might seem&lt;br /&gt;similar to Arrays, however, the Dictionary object is a more desirable solution&lt;br /&gt;to manipulate related data.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Comparing Dictionaries and Arrays:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Keys are used to identify the items in a Dictionary object&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;You do not have to call ReDim to change the size of the&lt;br /&gt;    Dictionary object&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;When deleting an item from a Dictionary, the remaining&lt;br /&gt;    items will automatically shift up&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Dictionaries cannot be multidimensional, Arrays can&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Dictionaries have more built-in functions than Arrays&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Dictionaries work better than arrays on accessing random&lt;br /&gt;    elements frequently&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Dictionaries work better than arrays on locating items by&lt;br /&gt;    their content&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The following example creates a Dictionary object, adds some&lt;br /&gt;key/item pairs to it, and retrieves the item value for the key gr:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Dim d&lt;br /&gt;Set d=Server.CreateObject(&amp;quot;Scripting.Dictionary&amp;quot;)&lt;br /&gt;d.Add &amp;quot;re&amp;quot;,&amp;quot;Red&amp;quot;&lt;br /&gt;d.Add &amp;quot;gr&amp;quot;,&amp;quot;Green&amp;quot;&lt;br /&gt;d.Add &amp;quot;bl&amp;quot;,&amp;quot;Blue&amp;quot;&lt;br /&gt;d.Add &amp;quot;pi&amp;quot;,&amp;quot;Pink&amp;quot;&lt;br /&gt;Response.Write(&amp;quot;The value of key gr is: &amp;quot; &amp;amp; d.Item(&amp;quot;gr&amp;quot;))&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Output:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;The value of key gr is: Green &lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Dictionary object's properties and methods are described&lt;br /&gt;below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="22%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="78%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/prop_comparemode.asp"&gt;&lt;font size="1"&gt;CompareMode&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Sets or returns the comparison mode for comparing keys&lt;br /&gt;        in a Dictionary object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/prop_count.asp"&gt;&lt;font size="1"&gt;Count&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the number of key/item pairs in a Dictionary&lt;br /&gt;        object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_item.asp"&gt;&lt;font size="1"&gt;Item&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets or returns the value of an item in a&lt;br /&gt;        Dictionary object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_key.asp"&gt;&lt;font size="1"&gt;Key&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets a new key value for an existing key&lt;br /&gt;        value in a Dictionary object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="22%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="78%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_add.asp"&gt;&lt;font size="1"&gt;Add&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Adds a new key/item pair to a Dictionary object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_exists.asp"&gt;&lt;font size="1"&gt;Exists&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns a Boolean value that indicates whether a&lt;br /&gt;        specified key exists in the Dictionary object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_items.asp"&gt;&lt;font size="1"&gt;Items&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns an array of all the items in a&lt;br /&gt;        Dictionary object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_keys.asp"&gt;&lt;font size="1"&gt;Keys&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns an array of all the keys in a&lt;br /&gt;        Dictionary object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_remove.asp"&gt;&lt;font size="1"&gt;Remove&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Removes one specified key/item pair from&lt;br /&gt;        the Dictionary object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_removeall.asp"&gt;&lt;font size="1"&gt;RemoveAll&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Removes all the key/item pairs in the&lt;br /&gt;        Dictionary object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-6166207526944904837?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/6166207526944904837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=6166207526944904837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/6166207526944904837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/6166207526944904837'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-dictionary-object.html' title='ASP Dictionary Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-3504085516345012527</id><published>2008-09-22T04:15:00.000-07:00</published><updated>2008-09-22T04:16:45.381-07:00</updated><title type='text'>ASP Folder Object</title><content type='html'>&lt;HR&gt;&lt;br /&gt;&lt;br /&gt;&lt;P class=intro&gt;&lt;font size="1"&gt;The Folder Object is used to return information about a specified &lt;br /&gt;folder.&lt;/font&gt;&lt;/P&gt;&lt;br /&gt;&lt;HR&gt;&lt;br /&gt;&lt;br /&gt;&lt;H2&gt;&lt;font size="1"&gt;The Folder Object&lt;/font&gt;&lt;/H2&gt;&lt;br /&gt;&lt;P&gt;&lt;font size="1"&gt;The Folder object is used to return information about a specified folder.&lt;/font&gt;&lt;/P&gt;&lt;br /&gt;&lt;P&gt;&lt;font size="1"&gt;To work with the properties and methods of the Folder object, you will have &lt;br /&gt;to create an instance of the Folder object through the FileSystemObject object. &lt;br /&gt;First; create a FileSystemObject object and then instantiate the Folder object &lt;br /&gt;through the GetFolder method of the FileSystemObject object.&lt;/font&gt;&lt;/P&gt;&lt;br /&gt;&lt;P&gt;&lt;font size="1"&gt;The following code uses the GetFolder method of the FileSystemObject object &lt;br /&gt;to instantiate the Folder object and the DateCreated property to return the date &lt;br /&gt;when the specified folder was created:&lt;/font&gt;&lt;/P&gt;&lt;br /&gt;&lt;TABLE class=ex cellSpacing=0 cellPadding=3 width="100%" border=1&gt;&lt;br /&gt;&lt;TBODY&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;PRE&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Dim fs,fo&lt;br /&gt;Set fs=Server.CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;Set fo=fs.GetFolder(&amp;quot;c:\test&amp;quot;)&lt;br /&gt;Response.Write(&amp;quot;Folder created: &amp;quot; &amp;amp; fo.DateCreated)&lt;br /&gt;set fo=nothing&lt;br /&gt;set fs=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/PRE&gt;&lt;br /&gt;&lt;P&gt;&lt;font size="1"&gt;Output:&lt;/font&gt;&lt;/P&gt;&lt;PRE&gt;&lt;font size="1"&gt;Folder created: 10/22/2001 10:01:19 AM&lt;/font&gt;&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;br /&gt;&lt;P&gt;&lt;font size="1"&gt;The Folder object's collections, properties, and methods are described below:&lt;/font&gt; &lt;br /&gt;&lt;/P&gt;&lt;br /&gt;&lt;H3&gt;&lt;font size="1"&gt;Collections&lt;/font&gt;&lt;/H3&gt;&lt;br /&gt;&lt;TABLE class=ex cellSpacing=0 cellPadding=3 width="100%" border=1&gt;&lt;br /&gt;&lt;TBODY&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TH vAlign=top align=left width="25%"&gt;&lt;font size="1"&gt;Collection&lt;/font&gt;&lt;/TH&gt;&lt;br /&gt;&lt;TH vAlign=top align=left width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="coll_files.asp"&gt;&lt;font size="1"&gt;Files&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns a collection of all the files in a specified &lt;br /&gt;folder&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="coll_subfolders.asp"&gt;&lt;font size="1"&gt;SubFolders&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns a collection of all subfolders in a specified &lt;br /&gt;folder&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;br /&gt;&lt;H3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/H3&gt;&lt;br /&gt;&lt;TABLE class=ex cellSpacing=0 cellPadding=3 width="100%" border=1&gt;&lt;br /&gt;&lt;TBODY&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TH vAlign=top align=left width="25%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/TH&gt;&lt;br /&gt;&lt;TH vAlign=top align=left width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_attributes_folder.asp"&gt;&lt;font size="1"&gt;Attributes&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Sets or returns the attributes of a specified folder&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_datecreated_folder.asp"&gt;&lt;font size="1"&gt;DateCreated&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns the date and time when a specified folder was &lt;br /&gt;created&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A &lt;br /&gt;href="prop_datelastaccessed_folder.asp"&gt;&lt;font size="1"&gt;DateLastAccessed&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns the date and time when a specified folder was last &lt;br /&gt;accessed&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A &lt;br /&gt;href="prop_datelastmodified_folder.asp"&gt;&lt;font size="1"&gt;DateLastModified&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns the date and time when a specified folder was last &lt;br /&gt;modified&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_drive_folder.asp"&gt;&lt;font size="1"&gt;Drive&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns the drive letter of the drive where the specified folder &lt;br /&gt;resides&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_isrootfolder.asp"&gt;&lt;font size="1"&gt;IsRootFolder&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns true if a folder is the root folder and false if &lt;br /&gt;not&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_name_folder.asp"&gt;&lt;font size="1"&gt;Name&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Sets or returns the name of a specified folder&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_parentfolder_folder.asp"&gt;&lt;font size="1"&gt;ParentFolder&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns the parent folder of a specified folder&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_path_folder.asp"&gt;&lt;font size="1"&gt;Path&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns the path for a specified folder&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_shortname_folder.asp"&gt;&lt;font size="1"&gt;ShortName&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns the short name of a specified folder (the 8.3 naming &lt;br /&gt;convention)&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_shortpath_folder.asp"&gt;&lt;font size="1"&gt;ShortPath&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns the short path of a specified folder (the 8.3 naming &lt;br /&gt;convention)&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_size_folder.asp"&gt;&lt;font size="1"&gt;Size&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns the size of a specified folder&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="prop_type_folder.asp"&gt;&lt;font size="1"&gt;Type&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Returns the type of a specified folder&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;br /&gt;&lt;H3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/H3&gt;&lt;br /&gt;&lt;TABLE class=ex cellSpacing=0 cellPadding=3 width="100%" border=1&gt;&lt;br /&gt;&lt;TBODY&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TH vAlign=top align=left width="25%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/TH&gt;&lt;br /&gt;&lt;TH vAlign=top align=left width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="met_copy_folder.asp"&gt;&lt;font size="1"&gt;Copy&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Copies a specified folder from one location to another&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="met_delete_folder.asp"&gt;&lt;font size="1"&gt;Delete&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Deletes a specified folder&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="met_move_folder.asp"&gt;&lt;font size="1"&gt;Move&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Moves a specified folder from one location to another&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;&lt;TR vAlign=top&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;A href="met_createtextfile_folder.asp"&gt;&lt;font size="1"&gt;CreateTextFile&lt;/font&gt;&lt;/A&gt;&lt;/TD&gt;&lt;br /&gt;&lt;TD vAlign=top&gt;&lt;font size="1"&gt;Creates a new text file in the specified folder and returns a &lt;br /&gt;TextStream object to access the file&lt;/font&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;font size="1"&gt;&lt;BR&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;HR&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-3504085516345012527?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/3504085516345012527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=3504085516345012527' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/3504085516345012527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/3504085516345012527'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-folder-object.html' title='ASP Folder Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-7349785330774433247</id><published>2008-09-20T18:07:00.001-07:00</published><updated>2008-09-20T18:07:35.389-07:00</updated><title type='text'>ASP File Object</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;The File object is used to return information&lt;br /&gt;about a specified file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_datecreated" target="_blank"&gt;When&lt;br /&gt;was the file created?&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to first create a FileSystemObject object, and&lt;br /&gt;then use the DateCreated property of the File object to get the date and time a&lt;br /&gt;specified file was created.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_datelastmodified" target="_blank"&gt;When&lt;br /&gt;was the file last modified?&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the DateLastModified property to get the&lt;br /&gt;date and time a specified file was last modified.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_datelastaccessed" target="_blank"&gt;When&lt;br /&gt;was the file last accessed?&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the DateLastAccessed property to get the&lt;br /&gt;date and time a specified file was last accessed.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_attributes" target="_blank"&gt;Return&lt;br /&gt;the attributes of a specified file&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the Attributes property to return the&lt;br /&gt;attributes of a specified file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The File Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The File object is used to return information about a&lt;br /&gt;specified file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To work with the properties and methods of the File object,&lt;br /&gt;you will have to create an instance of the File object through the&lt;br /&gt;FileSystemObject object. First; create a FileSystemObject object and then&lt;br /&gt;instantiate the File object through the GetFile method of the FileSystemObject&lt;br /&gt;object or through the Files property of the Folder object.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The following code uses the GetFile method of the&lt;br /&gt;FileSystemObject object to instantiate the File object and the DateCreated&lt;br /&gt;property to return the date when the specified file was created:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Dim fs,f&lt;br /&gt;Set fs=Server.CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;Set f=fs.GetFile(&amp;quot;c:\test.txt&amp;quot;)&lt;br /&gt;Response.Write(&amp;quot;File created: &amp;quot; &amp;amp; f.DateCreated)&lt;br /&gt;set f=nothing&lt;br /&gt;set fs=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Output:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;File created: 9/19/2001 10:01:19 AM&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The File object's properties and methods are described below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="28%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="72%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_attributes_file.asp"&gt;&lt;font size="1"&gt;Attributes&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets or returns the attributes of a&lt;br /&gt;        specified file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_datecreated_file.asp"&gt;&lt;font size="1"&gt;DateCreated&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the date and time when a specified&lt;br /&gt;        file was created&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_datelastaccessed_file.asp"&gt;&lt;font size="1"&gt;DateLastAccessed&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the date and time when a specified&lt;br /&gt;        file was last accessed&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_datelastmodified_file.asp"&gt;&lt;font size="1"&gt;DateLastModified&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the date and time when a specified&lt;br /&gt;        file was last modified&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_drive_file.asp"&gt;&lt;font size="1"&gt;Drive&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the drive letter of the drive&lt;br /&gt;        where a specified file or folder resides&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_name_file.asp"&gt;&lt;font size="1"&gt;Name&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets or returns the name of a specified&lt;br /&gt;        file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_parentfolder_file.asp"&gt;&lt;font size="1"&gt;ParentFolder&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the folder object for the parent&lt;br /&gt;        of the specified file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_path_file.asp"&gt;&lt;font size="1"&gt;Path&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the path for a specified file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_shortname_file.asp"&gt;&lt;font size="1"&gt;ShortName&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the short name of a specified file&lt;br /&gt;        (the 8.3 naming convention)&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_shortpath_file.asp"&gt;&lt;font size="1"&gt;ShortPath&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the short path of a specified file&lt;br /&gt;        (the 8.3 naming convention)&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_size_file.asp"&gt;&lt;font size="1"&gt;Size&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the size, in bytes, of a specified&lt;br /&gt;        file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_type_file.asp"&gt;&lt;font size="1"&gt;Type&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the type of a specified file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="28%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="72%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_copy_file.asp"&gt;&lt;font size="1"&gt;Copy&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Copies a specified file from one location&lt;br /&gt;        to another&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_delete_file.asp"&gt;&lt;font size="1"&gt;Delete&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Deletes a specified file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_move_file.asp"&gt;&lt;font size="1"&gt;Move&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Moves a specified file from one location&lt;br /&gt;        to another&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/met_openastextstream.asp"&gt;OpenAsTextStream&lt;/a&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Opens a specified file and returns a&lt;br /&gt;        TextStream object to access the file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-7349785330774433247?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/7349785330774433247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=7349785330774433247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/7349785330774433247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/7349785330774433247'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-file-object.html' title='ASP File Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-5146050100546627805</id><published>2008-09-20T18:05:00.001-07:00</published><updated>2008-09-20T18:05:45.357-07:00</updated><title type='text'>ASP Drive Object</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;The Drive object is used to return information&lt;br /&gt;about a local disk drive or a network share.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_availablespace" target="_blank"&gt;Get&lt;br /&gt;the available space of a specified drive&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to first create a FileSystemObject object, and&lt;br /&gt;then use the AvailableSpace property to get the available space of a specified&lt;br /&gt;drive.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_freespace" target="_blank"&gt;Get&lt;br /&gt;the free space of a specified drive&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the FreeSpace property to get the free&lt;br /&gt;space of a specified drive.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_totalsize" target="_blank"&gt;Get&lt;br /&gt;the total size of a specified drive&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the TotalSize property to get the total&lt;br /&gt;size of a specified drive.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_driveletter" target="_blank"&gt;Get&lt;br /&gt;the drive letter of a specified drive&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the DriveLetter property to get the drive&lt;br /&gt;letter of a specified drive.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_drivetype" target="_blank"&gt;Get&lt;br /&gt;the drive type of a specified drive&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the DriveType property to get the drive&lt;br /&gt;type of a specified drive.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_filesystem" target="_blank"&gt;Get&lt;br /&gt;the file system of a specified drive&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the FileSystem property to get the file&lt;br /&gt;system of a specified drive.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_isready" target="_blank"&gt;Is&lt;br /&gt;the drive ready?&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the IsReady property to check whether a&lt;br /&gt;specified drive is ready.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_path" target="_blank"&gt;Get&lt;br /&gt;the path of a specified drive&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the Path property to get the path of a&lt;br /&gt;specified drive.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_rootfolder" target="_blank"&gt;Get&lt;br /&gt;the root folder of a specified drive&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the RootFolder property to get the root&lt;br /&gt;folder of a specified drive.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_serialnumber" target="_blank"&gt;Get&lt;br /&gt;the serialnumber of a specified drive&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the Serialnumber property to get the&lt;br /&gt;serialnumber of a specified drive.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The Drive Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Drive object is used to return information about a local&lt;br /&gt;disk drive or a network share. The Drive object can return information about a&lt;br /&gt;drive's type of file system, free space, serial number, volume name, and more.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; You cannot return information about a drive's&lt;br /&gt;content with the Drive object. For this purpose you will have to use the Folder&lt;br /&gt;object.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To work with the properties of the Drive object, you will have&lt;br /&gt;to create an instance of the Drive object through the FileSystemObject object.&lt;br /&gt;First; create a FileSystemObject object and then instantiate the Drive object&lt;br /&gt;through the GetDrive method or the Drives property of the FileSystemObject&lt;br /&gt;object.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The following example uses the GetDrive method of the&lt;br /&gt;FileSystemObject object to instantiate the Drive object and the TotalSize&lt;br /&gt;property to return the total size in bytes of the specified drive (c:):&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Dim fs,d&lt;br /&gt;Set fs=Server.CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;Set d=fs.GetDrive(&amp;quot;c:&amp;quot;)&lt;br /&gt;Response.Write(&amp;quot;Drive &amp;quot; &amp;amp; d &amp;amp; &amp;quot;:&amp;quot;)&lt;br /&gt;Response.Write(&amp;quot;Total size in bytes: &amp;quot; &amp;amp; d.TotalSize)&lt;br /&gt;set d=nothing&lt;br /&gt;set fs=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Output:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Drive c: Total size in bytes: 4293563392&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Drive object's properties are described below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="25%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_availablespace.asp"&gt;&lt;font size="1"&gt;AvailableSpace&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the amount of available space to a&lt;br /&gt;        user on a specified drive or network share&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_driveletter.asp"&gt;&lt;font size="1"&gt;DriveLetter&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns one uppercase letter that&lt;br /&gt;        identifies the local drive or a network share&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_drivetype.asp"&gt;&lt;font size="1"&gt;DriveType&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the type of a specified drive&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_filesystem.asp"&gt;&lt;font size="1"&gt;FileSystem&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the file system in use for a&lt;br /&gt;        specified drive&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_freespace.asp"&gt;&lt;font size="1"&gt;FreeSpace&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the amount of free space to a user&lt;br /&gt;        on a specified drive or network share&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_isready.asp"&gt;&lt;font size="1"&gt;IsReady&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns true if the specified drive is&lt;br /&gt;        ready and false if not&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_path_drive.asp"&gt;&lt;font size="1"&gt;Path&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns an uppercase letter followed by a&lt;br /&gt;        colon that indicates the path name for a specified drive&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_rootfolder.asp"&gt;&lt;font size="1"&gt;RootFolder&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns a Folder object that represents&lt;br /&gt;        the root folder of a specified drive&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_serialnumber.asp"&gt;&lt;font size="1"&gt;SerialNumber&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the serial number of a specified&lt;br /&gt;        drive&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_sharename.asp"&gt;&lt;font size="1"&gt;ShareName&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the network share name for a&lt;br /&gt;        specified drive&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_totalsize.asp"&gt;&lt;font size="1"&gt;TotalSize&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the total size of a specified&lt;br /&gt;        drive or network share&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_volumename.asp"&gt;&lt;font size="1"&gt;VolumeName&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets or returns the volume name of a&lt;br /&gt;        specified drive&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-5146050100546627805?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/5146050100546627805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=5146050100546627805' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/5146050100546627805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/5146050100546627805'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-drive-object.html' title='ASP Drive Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-4183155191317524050</id><published>2008-09-20T18:04:00.000-07:00</published><updated>2008-09-20T18:05:05.503-07:00</updated><title type='text'>ASP TextStream Object</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;The TextStream object is used to access the&lt;br /&gt;contents of a text file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_readtextfile" target="_blank"&gt;Read&lt;br /&gt;textfile&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the OpenTextFile method of the&lt;br /&gt;FileSystemObject to create a&amp;nbsp;TextStream Object. The ReadAll method of the&lt;br /&gt;TextStream Object reads from the opened text file.&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_readpartoftextfile" target="_blank"&gt;&lt;font size="1"&gt;Read&lt;br /&gt;only a part of&amp;nbsp; a textfile&lt;/font&gt;&lt;/a&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to only read a part of a TextStream file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_readline" target="_blank"&gt;Read&lt;br /&gt;one line of a textfile&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to read one line from a TextStream file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_readlines" target="_blank"&gt;Read&lt;br /&gt;all lines from a textfile&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to read all the lines from a TextStream file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_skip" target="_blank"&gt;Skip&lt;br /&gt;a part of a textfile&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to skip a specified number of characters when&lt;br /&gt;reading the TextStream file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_skipline" target="_blank"&gt;Skip&lt;br /&gt;a line of a textfile&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to skip a line when reading the TextStream file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_line" target="_blank"&gt;Return&lt;br /&gt;line-number&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to return the current line number in a TextStream&lt;br /&gt;file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_column" target="_blank"&gt;Get&lt;br /&gt;column number&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to get the column number of the current character&lt;br /&gt;in a file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The TextStream Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The TextStream object is used to access the contents of text&lt;br /&gt;files.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The following code creates a text file (c:\test.txt) and then&lt;br /&gt;writes some text to the file (the variable f is an instance of the TextStream&lt;br /&gt;object):&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&amp;nbsp;&lt;br /&gt;dim fs, f&amp;nbsp;&lt;br /&gt;set fs=Server.CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&amp;nbsp;&lt;br /&gt;set f=fs.CreateTextFile(&amp;quot;c:\test.txt&amp;quot;,true)&amp;nbsp;&lt;br /&gt;f.WriteLine(&amp;quot;Hello World!&amp;quot;)&lt;br /&gt;f.Close&lt;br /&gt;set f=nothing&lt;br /&gt;set fs=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To create an instance of the TextStream object you can use the&lt;br /&gt;CreateTextFile or OpenTextFile methods of the FileSystemObject object, or you&lt;br /&gt;can use the OpenAsTextStream method of the File object.&lt;/font&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The TextStream object's properties and methods are described&lt;br /&gt;below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="25%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_atendofline.asp"&gt;&lt;font size="1"&gt;AtEndOfLine&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns true if the file pointer is&lt;br /&gt;        positioned immediately before the end-of-line marker in a TextStream&lt;br /&gt;        file, and false if not&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_atendofstream.asp"&gt;&lt;font size="1"&gt;AtEndOfStream&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns true if the file pointer is at the&lt;br /&gt;        end of a TextStream file, and false if not&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_column.asp"&gt;&lt;font size="1"&gt;Column&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the column number of the current&lt;br /&gt;        character position in an input stream&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_line.asp"&gt;&lt;font size="1"&gt;Line&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the current line number in a&lt;br /&gt;        TextStream file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="25%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_close.asp"&gt;&lt;font size="1"&gt;Close&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Closes an open TextStream file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_read.asp"&gt;&lt;font size="1"&gt;Read&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Reads a specified number of characters&lt;br /&gt;        from a TextStream file and returns the result&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_readall.asp"&gt;&lt;font size="1"&gt;ReadAll&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Reads an entire TextStream file and&lt;br /&gt;        returns the result&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_readline.asp"&gt;&lt;font size="1"&gt;ReadLine&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Reads one line from a TextStream file and&lt;br /&gt;        returns the result&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_skip.asp"&gt;&lt;font size="1"&gt;Skip&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Skips a specified number of characters&lt;br /&gt;        when reading a TextStream file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_skipline.asp"&gt;&lt;font size="1"&gt;SkipLine&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Skips the next line when reading a&lt;br /&gt;        TextStream file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_write.asp"&gt;&lt;font size="1"&gt;Write&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Writes a specified text to a TextStream&lt;br /&gt;        file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_writeline.asp"&gt;&lt;font size="1"&gt;WriteLine&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Writes a specified text and a new-line&lt;br /&gt;        character to a TextStream file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_writeblanklines.asp"&gt;&lt;font size="1"&gt;WriteBlankLines&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Writes a specified number of new-line&lt;br /&gt;        character to a TextStream file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-4183155191317524050?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/4183155191317524050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=4183155191317524050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4183155191317524050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4183155191317524050'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-textstream-object.html' title='ASP TextStream Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-2000875775425482554</id><published>2008-09-20T18:03:00.000-07:00</published><updated>2008-09-20T18:04:18.057-07:00</updated><title type='text'>ASP FileSystemObject Object</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;The FileSystemObject object is used to access&lt;br /&gt;the file system on the server.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_fileexists" target="_blank"&gt;Does&lt;br /&gt;a specified file exist?&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to first create a FileSystemObject Object, and&lt;br /&gt;then use the FileExists method to check if the file exists.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_folderexists" target="_blank"&gt;Does&lt;br /&gt;a specified folder exist?&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the FolderExists method to check if a&lt;br /&gt;folder exists.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_driveexists" target="_blank"&gt;Does&lt;br /&gt;a specified drive exist?&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the DriveExists method to check if a drive&lt;br /&gt;exists.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_getdrivename" target="_blank"&gt;Get&lt;br /&gt;the name of a specified drive&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the GetDriveName method to get the name of&lt;br /&gt;a specified drive.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_getparentfoldername" target="_blank"&gt;Get&lt;br /&gt;the name of the parent folder of a specified path&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the GetParentFolderName method to get the&lt;br /&gt;name of the parent folder of a specified path.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_getextensionname" target="_blank"&gt;Get&lt;br /&gt;the file extension&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the GetExtensionName method to get the file&lt;br /&gt;extension of the last component in a specified path.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_getfilename" target="_blank"&gt;Get&lt;br /&gt;file name&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the GetFileName method to get the file name&lt;br /&gt;of the last component in a specified path.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showfile.asp?filename=demo_getbasename" target="_blank"&gt;Get&lt;br /&gt;the base name of a file or folder&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the GetBaseName method to return the base&lt;br /&gt;name of the file or folder, in a specified path.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The FileSystemObject Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The FileSystemObject object is used to access the file system&lt;br /&gt;on the server. This object can manipulate files, folders, and directory paths.&lt;br /&gt;It is also possible to retrieve file system information with this object.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The following code creates a text file (c:\test.txt) and then&lt;br /&gt;writes some text to the file:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br&gt;&lt;br /&gt;        dim fs,fname&lt;br&gt;&lt;br /&gt;        set fs=Server.CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br&gt;&lt;br /&gt;        set fname=fs.CreateTextFile(&amp;quot;c:\test.txt&amp;quot;,true)&lt;br&gt;&lt;br /&gt;        fname.WriteLine(&amp;quot;Hello World!&amp;quot;)&lt;br&gt;&lt;br /&gt;        fname.Close&lt;br&gt;&lt;br /&gt;        set fname=nothing&lt;br&gt;&lt;br /&gt;        set fs=nothing&lt;br&gt;&lt;br /&gt;        %&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;The FileSystemObject object's properties and methods are described below:&lt;/font&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="32%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="68%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_drives.asp"&gt;&lt;font size="1"&gt;Drives&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns a collection of all Drive objects&lt;br /&gt;        on the computer&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="32%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="68%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_buildpath.asp"&gt;&lt;font size="1"&gt;BuildPath&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Appends a name to an existing path&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_copyfile.asp"&gt;&lt;font size="1"&gt;CopyFile&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Copies one or more files from one location&lt;br /&gt;        to another&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_copyfolder.asp"&gt;&lt;font size="1"&gt;CopyFolder&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Copies one or more folders from one&lt;br /&gt;        location to another&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_createfolder.asp"&gt;&lt;font size="1"&gt;CreateFolder&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Creates a new folder&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_createtextfile_filesystem.asp"&gt;&lt;font size="1"&gt;CreateTextFile&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Creates a text file and returns a&lt;br /&gt;        TextStream object that can be used to read from, or write to the file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_deletefile.asp"&gt;&lt;font size="1"&gt;DeleteFile&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Deletes one or more specified files&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_deletefolder.asp"&gt;&lt;font size="1"&gt;DeleteFolder&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Deletes one or more specified folders&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_driveexists.asp"&gt;&lt;font size="1"&gt;DriveExists&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Checks if a specified drive exists&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_fileexists.asp"&gt;&lt;font size="1"&gt;FileExists&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Checks if a specified file exists&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_folderexists.asp"&gt;&lt;font size="1"&gt;FolderExists&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Checks if a specified folder exists&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_getabsolutepathname.asp"&gt;&lt;font size="1"&gt;GetAbsolutePathName&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the complete path from the root of&lt;br /&gt;        the drive for the specified path&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_getbasename.asp"&gt;&lt;font size="1"&gt;GetBaseName&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the base name of a specified file&lt;br /&gt;        or folder&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_getdrive.asp"&gt;&lt;font size="1"&gt;GetDrive&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns a Drive object corresponding to&lt;br /&gt;        the drive in a specified path&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_getdrivename.asp"&gt;&lt;font size="1"&gt;GetDriveName&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the drive name of a specified path&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_getextensionname.asp"&gt;&lt;font size="1"&gt;GetExtensionName&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the file extension name for the&lt;br /&gt;        last component in a specified path&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_getfile.asp"&gt;&lt;font size="1"&gt;GetFile&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns a File object for a specified path&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_getfilename.asp"&gt;&lt;font size="1"&gt;GetFileName&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the file name or folder name for&lt;br /&gt;        the last component in a specified path&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_getfolder.asp"&gt;&lt;font size="1"&gt;GetFolder&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns a Folder object for a specified&lt;br /&gt;        path&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_getparentfoldername.asp"&gt;&lt;font size="1"&gt;GetParentFolderName&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the name of the parent folder of&lt;br /&gt;        the last component in a specified path&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_getspecialfolder.asp"&gt;&lt;font size="1"&gt;GetSpecialFolder&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the path to some of Windows'&lt;br /&gt;        special folders&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_gettempname.asp"&gt;&lt;font size="1"&gt;GetTempName&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns a randomly generated temporary&lt;br /&gt;        file or folder&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_movefile.asp"&gt;&lt;font size="1"&gt;MoveFile&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Moves one or more files from one location&lt;br /&gt;        to another&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_movefolder.asp"&gt;&lt;font size="1"&gt;MoveFolder&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Moves one or more folders from one&lt;br /&gt;        location to another&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_opentextfile.asp"&gt;&lt;font size="1"&gt;OpenTextFile&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Opens a file and returns a TextStream&lt;br /&gt;        object that can be used to access the file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-2000875775425482554?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/2000875775425482554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=2000875775425482554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/2000875775425482554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/2000875775425482554'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-filesystemobject-object.html' title='ASP FileSystemObject Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-5198464860369729944</id><published>2008-09-20T18:02:00.002-07:00</published><updated>2008-09-20T18:03:37.409-07:00</updated><title type='text'>ASP ASPError Object</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;The ASPError object is used to display detailed&lt;br /&gt;information of any error that occurs in scripts in an ASP page.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The ASPError Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASPError object was implemented in ASP 3.0 and is&lt;br /&gt;available in IIS5 and later.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASPError object is used to display detailed information of&lt;br /&gt;any error that occurs in scripts in an ASP page. The ASPError object is created&lt;br /&gt;when Server.GetLastError is called, so the error information can only be&lt;br /&gt;accessed by using the Server.GetLastError method.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASPError object's properties are described below (all&lt;br /&gt;properties are read-only):&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; The properties below can only be accessed through&lt;br /&gt;the Server.GetLastError() method.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/prop_asperrorobject.asp"&gt;&lt;font size="1"&gt;ASPCode&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns an error code generated by IIS&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/prop_asperrorobject.asp"&gt;&lt;font size="1"&gt;ASPDescription&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns a detailed description of the error (if the&lt;br /&gt;        error is ASP-related)&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/prop_asperrorobject.asp"&gt;&lt;font size="1"&gt;Category&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the source of the error (was the error&lt;br /&gt;        generated by ASP? By a scripting language? By an object?)&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/prop_asperrorobject.asp"&gt;&lt;font size="1"&gt;Column&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the column position within the file that&lt;br /&gt;        generated the error&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/prop_asperrorobject.asp"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns a short description of the error&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/prop_asperrorobject.asp"&gt;&lt;font size="1"&gt;File&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the name of the ASP file that generated the&lt;br /&gt;        error&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/prop_asperrorobject.asp"&gt;&lt;font size="1"&gt;Line&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the line number where the error was detected&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/prop_asperrorobject.asp"&gt;&lt;font size="1"&gt;Number&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns the standard COM error code for the error&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_asperrorobject.asp"&gt;&lt;font size="1"&gt;Source&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Returns the actual source code of the line where the&lt;br /&gt;        error occurred&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-5198464860369729944?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/5198464860369729944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=5198464860369729944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/5198464860369729944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/5198464860369729944'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-asperror-object.html' title='ASP ASPError Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-460692633892310152</id><published>2008-09-20T18:02:00.001-07:00</published><updated>2008-09-20T18:02:47.537-07:00</updated><title type='text'>ASP Server Object</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;The ASP Server object is used to access&lt;br /&gt;properties and methods on the server.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_lastmodified" target="_blank"&gt;When&lt;br /&gt;was a file last modified?&lt;/a&gt;&lt;br&gt;&lt;br /&gt;Checks when this file was last modified.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_textstream" target="_blank"&gt;Open&lt;br /&gt;a text file for reading&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example opens the file &amp;quot;Textfile.txt&amp;quot; for reading.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_hitcounter" target="_blank"&gt;Homemade&lt;br /&gt;hit counter&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example reads a number from a file, adds 1 to the number, and writes the&lt;br /&gt;number back to the file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Server Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASP Server object is used to access properties and methods&lt;br /&gt;on the server. Its properties and methods are described below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_scripttimeout.asp"&gt;&lt;font size="1"&gt;ScriptTimeout&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets or returns the maximum number of&lt;br /&gt;        seconds a script can run before it is terminated&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_createobject_server.asp"&gt;&lt;font size="1"&gt;CreateObject&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Creates an instance of an object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_execute.asp"&gt;&lt;font size="1"&gt;Execute&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Executes an ASP file from inside another ASP file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_getlasterror.asp"&gt;&lt;font size="1"&gt;GetLastError()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Returns an ASPError object that describes the error&lt;br /&gt;        condition that occurred&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_htmlencode.asp"&gt;&lt;font size="1"&gt;HTMLEncode&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Applies HTML encoding to a specified string&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_mappath.asp"&gt;&lt;font size="1"&gt;MapPath&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Maps a specified path to a physical path&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_transfer.asp"&gt;&lt;font size="1"&gt;Transfer&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Sends (transfers) all the information created in one&lt;br /&gt;        ASP file to a second ASP file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_urlencode.asp"&gt;&lt;font size="1"&gt;URLEncode&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Applies URL encoding rules to a specified string&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-460692633892310152?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/460692633892310152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=460692633892310152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/460692633892310152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/460692633892310152'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-server-object.html' title='ASP Server Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-6478672883857068942</id><published>2008-09-20T18:01:00.000-07:00</published><updated>2008-09-20T18:02:07.376-07:00</updated><title type='text'>ASP Session Object</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;The Session object is used to store information&lt;br /&gt;about, or change settings for a user session. Variables stored in the Session&lt;br /&gt;object hold information about one single user, and are available to all pages in&lt;br /&gt;one application.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_lcid" target="_blank"&gt;Set&lt;br /&gt;and return the LCID&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates the &amp;quot;LCID&amp;quot; property. This property sets or&lt;br /&gt;returns an integer that specifies a location or region. Contents like date,&lt;br /&gt;time, and currency will be displayed according to that location or region.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_sessionid" target="_blank"&gt;Return&lt;br /&gt;the SessionID&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates the &amp;quot;SessionID&amp;quot; property. This property&lt;br /&gt;returns a unique id for each user. The id is generated by the server.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_gettimeout" target="_blank"&gt;A&lt;br /&gt;session's timeout&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates the &amp;quot;Timeout&amp;quot; property. This example sets&lt;br /&gt;and returns the timeout (in minutes) for the session.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Session Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;When you are working with an application, you open it, do some&lt;br /&gt;changes and then you close it. This is much like a Session. The computer knows&lt;br /&gt;who you are. It knows when you start the application and when you end. But on&lt;br /&gt;the internet there is one problem: the web server does not know who you are and&lt;br /&gt;what you do because the HTTP address doesn't maintain state.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;ASP solves this problem by creating a unique cookie for each&lt;br /&gt;user. The cookie is sent to the client and it contains information that&lt;br /&gt;identifies the user. This interface is called the Session object.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Session object is used to store information about, or&lt;br /&gt;change settings for a user session. Variables stored in the Session object hold&lt;br /&gt;information about one single user, and are available to all pages in one&lt;br /&gt;application. Common information stored in session variables are name, id, and&lt;br /&gt;preferences. The server creates a new Session object for each new user, and&lt;br /&gt;destroys the Session object when the session expires.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Session object's collections, properties, methods, and&lt;br /&gt;events are described below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Collections&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="32%"&gt;&lt;font size="1"&gt;Collection&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="68%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/coll_contents_sess.asp"&gt;&lt;font size="1"&gt;Contents&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Contains all the items appended to the session through&lt;br /&gt;        a script command&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/coll_staticobjects_sess.asp"&gt;&lt;font size="1"&gt;StaticObjects&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Contains all the objects appended to the session with&lt;br /&gt;        the HTML &amp;lt;object&amp;gt; tag&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="32%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="68%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_codepage.asp"&gt;&lt;font size="1"&gt;CodePage&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Specifies the character set that will be&lt;br /&gt;        used when displaying dynamic content&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_lcid.asp"&gt;&lt;font size="1"&gt;LCID&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets or returns an integer that specifies&lt;br /&gt;        a location or region. Contents like date, time, and currency will be&lt;br /&gt;        displayed according to that location or region&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_sessionid.asp"&gt;&lt;font size="1"&gt;SessionID&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns a unique id for each user. The&lt;br /&gt;        unique id is generated by the server&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_timeout.asp"&gt;&lt;font size="1"&gt;Timeout&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets or returns the timeout period (in&lt;br /&gt;        minutes) for the Session object in this application&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="32%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="68%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_abandon.asp"&gt;&lt;font size="1"&gt;Abandon&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Destroys a user session&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_contents_remove_sess.asp"&gt;&lt;font size="1"&gt;Contents.Remove&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Deletes an item from the Contents&lt;br /&gt;        collection&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_contents_removeall_sess.asp"&gt;&lt;font size="1"&gt;Contents.RemoveAll()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Deletes all items from the Contents&lt;br /&gt;        collection&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Events&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="32%"&gt;&lt;font size="1"&gt;Event&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="68%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/ev_sess_onend_onstart.asp"&gt;&lt;font size="1"&gt;Session_OnEnd&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Occurs when a session ends&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/ev_sess_onend_onstart.asp"&gt;&lt;font size="1"&gt;Session_OnStart&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Occurs when a session starts&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-6478672883857068942?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/6478672883857068942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=6478672883857068942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/6478672883857068942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/6478672883857068942'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-session-object_20.html' title='ASP Session Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-4917960310229609552</id><published>2008-09-18T02:47:00.014-07:00</published><updated>2008-09-18T03:23:25.641-07:00</updated><title type='text'>ASP Application Object</title><content type='html'>&lt;hr&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;A group of ASP files that work together to&lt;br /&gt;perform some purpose is called an application. The Application object in ASP is&lt;br /&gt;used to tie these files together.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Application Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;An application on the Web may be a group of ASP files. The ASP&lt;br /&gt;files work together to perform some purpose. The Application object in ASP is&lt;br /&gt;used to tie these files together.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Application object is used to store and access variables&lt;br /&gt;from any page, just like the Session object. The difference is that ALL users&lt;br /&gt;share one Application object, while with Sessions there is one Session object&lt;br /&gt;for EACH user.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Application object should hold information that will be&lt;br /&gt;used by many pages in the application (like database connection information).&lt;br /&gt;This means that you can access the information from any page. It also means that&lt;br /&gt;you can change the information in one place and the changes will automatically&lt;br /&gt;be reflected on all pages.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Application object's collections, methods, and events are&lt;br /&gt;described below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Collections&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="30%"&gt;&lt;font size="1"&gt;Collection&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="70%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/coll_contents_app.asp"&gt;&lt;font size="1"&gt;Contents&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Contains all the items appended to the application&lt;br /&gt;        through a script command&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/coll_staticobjects_app.asp"&gt;&lt;font size="1"&gt;StaticObjects&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Contains all the objects appended to the application&lt;br /&gt;        with the HTML &amp;lt;object&amp;gt; tag&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="30%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="70%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_contents_remove_app.asp"&gt;&lt;font size="1"&gt;Contents.Remove&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Deletes an item from the Contents&lt;br /&gt;        collection&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_contents_removeall_app.asp"&gt;&lt;font size="1"&gt;Contents.RemoveAll()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Deletes all items from the Contents&lt;br /&gt;        collection&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_lock_unlock.asp"&gt;&lt;font size="1"&gt;Lock&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Prevents other users from modifying the&lt;br /&gt;        variables in the Application object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/met_lock_unlock.asp"&gt;&lt;font size="1"&gt;Unlock&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Enables other users to modify the&lt;br /&gt;        variables in the Application object (after it has been locked using the&lt;br /&gt;        Lock method)&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Events&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="30%"&gt;&lt;font size="1"&gt;Event&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="70%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/ev_app_onend_onstart.asp"&gt;&lt;font size="1"&gt;Application_OnEnd&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Occurs when all user sessions are over, and the&lt;br /&gt;        application ends&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/ev_app_onend_onstart.asp"&gt;&lt;font size="1"&gt;Application_OnStart&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Occurs before the first new session is created (when&lt;br /&gt;        the Application object is first referenced)&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-4917960310229609552?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/4917960310229609552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=4917960310229609552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4917960310229609552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4917960310229609552'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-application-object_18.html' title='ASP Application Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-3467374016817979451</id><published>2008-09-18T02:47:00.013-07:00</published><updated>2008-09-18T03:22:21.782-07:00</updated><title type='text'>ASP Request Object</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;The ASP Request object is used to get&lt;br /&gt;information from the user.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;QueryString Collection Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_simplequerystring" target="_blank"&gt;Send&lt;br /&gt;query information when a user clicks on a link&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to send some extra query information to a page&lt;br /&gt;within a link, and retrieve that information on the destination page (which is,&lt;br /&gt;in this example, the same page).&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_simplereqquery" target="_blank"&gt;A&lt;br /&gt;QueryString collection in its simplest use&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how the &lt;b&gt;QueryString &lt;/b&gt;collection retrieves the&lt;br /&gt;values from a form. The form uses the GET method, which means that the&lt;br /&gt;information sent is visible to everybody (in the address field). The GET method&lt;br /&gt;also limits the amount of information that can be sent.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_reqquery" target="_blank"&gt;How&lt;br /&gt;to use information from forms&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the values retrieved from a form. We use&lt;br /&gt;the &lt;b&gt;QueryString &lt;/b&gt;collection. The form uses the get method.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_reqquery2" target="_blank"&gt;More&lt;br /&gt;information from a form&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates what the &lt;b&gt;QueryString &lt;/b&gt;contains if several input&lt;br /&gt;fields have the same name. It shows how to separate input fields with equal&lt;br /&gt;names from each other. It also shows how to use the &lt;b&gt;Count&lt;/b&gt; keyword to&lt;br /&gt;count the &amp;quot;name&amp;quot; property. The form uses the get method.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Form Collection Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_simpleform1" target="_blank"&gt;A&lt;br /&gt;form collection in its simplest use&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how the &lt;b&gt;Form&lt;/b&gt; collection retrieves the values&lt;br /&gt;from a form. The form uses the POST method, which means that the information&lt;br /&gt;sent is invisible to others, and it has no limits (you can send a large amount&lt;br /&gt;of information).&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_simpleform" target="_blank"&gt;How&lt;br /&gt;to use information from forms&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the values retrieved from a form. We use&lt;br /&gt;the &lt;b&gt;Form &lt;/b&gt;collection. The form uses the post method.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_form2" target="_blank"&gt;More&lt;br /&gt;information from a form&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates what the &lt;b&gt;Form &lt;/b&gt;collection contains if several&lt;br /&gt;input fields have the same name. It shows how to separate input fields with&lt;br /&gt;equal names from each other. It also shows how to use the &lt;b&gt;Count&lt;/b&gt; keyword&lt;br /&gt;to count the &amp;quot;name&amp;quot; property. The form uses the post method.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_radiob" target="_blank"&gt;A&lt;br /&gt;form with radio buttons&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to interact with the user through radio buttons,&lt;br /&gt;with the &lt;b&gt;Form&lt;/b&gt; collection. The form uses the post method.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_checkboxes" target="_blank"&gt;A&lt;br /&gt;form with checkboxes&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to interact with the user through checkboxes, with&lt;br /&gt;the &lt;b&gt;Form&lt;/b&gt; collection. The form uses the post method.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Other Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_server" target="_blank"&gt;Get&lt;br /&gt;the server variables&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to find out the visitors (yours) browser type, IP&lt;br /&gt;address, and more with the &lt;b&gt;ServerVariables&lt;/b&gt; collection.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_cookies" target="_blank"&gt;&lt;font size="1"&gt;Create&lt;br /&gt;a welcome cookie&lt;/font&gt;&lt;/a&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to create a Welcome Cookie with the &lt;b&gt;Cookies&lt;/b&gt;&lt;br /&gt;Collection.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_totalbytes" target="_blank"&gt;Find&lt;br /&gt;the total number of bytes the user sent&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to use the &lt;b&gt;TotalBytes&lt;/b&gt; property to find out&lt;br /&gt;the total number of bytes the user sent in the Request object.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Request Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;When a browser asks for a page from a server, it is called a&lt;br /&gt;request. The ASP Request object is used to get information from the user. Its&lt;br /&gt;collections, properties, and methods are described below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Collections&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Collection&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;ClientCertificate&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Contains all the field values stored in the client&lt;br /&gt;        certificate&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/coll_cookies_request.asp"&gt;&lt;font size="1"&gt;Cookies&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Contains all the cookie values sent in a HTTP request&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/coll_form.asp"&gt;&lt;font size="1"&gt;Form&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Contains all the form (input) values from a form that&lt;br /&gt;        uses the post method&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/coll_querystring.asp"&gt;&lt;font size="1"&gt;QueryString&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Contains all the variable values in a HTTP query string&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/coll_servervariables.asp"&gt;&lt;font size="1"&gt;ServerVariables&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Contains all the server variable values&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_totalbytes.asp"&gt;&lt;font size="1"&gt;TotalBytes&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Returns the total number of bytes the&lt;br /&gt;        client sent in the body of the request&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_binaryread.asp"&gt;&lt;font size="1"&gt;BinaryRead&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Retrieves the data sent to the server from the client&lt;br /&gt;        as part of a post request and stores it in a safe array&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-3467374016817979451?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/3467374016817979451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=3467374016817979451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/3467374016817979451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/3467374016817979451'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-request-object.html' title='ASP Request Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-5326641881505599718</id><published>2008-09-18T02:47:00.012-07:00</published><updated>2008-09-18T03:21:30.416-07:00</updated><title type='text'>ASP Response Object</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;The ASP Response object is used to send output&lt;br /&gt;to the user from the server.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_text" target="_blank"&gt;Write&lt;br /&gt;text with ASP&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to write text with ASP.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_formatting" target="_blank"&gt;Format&lt;br /&gt;text with HTML tags in ASP&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to combine text and HTML tags with ASP.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_redirect" target="_blank"&gt;Redirect&lt;br /&gt;the user to a different URL&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to redirect the user to a different URL.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_randomlink" target="_blank"&gt;Show&lt;br /&gt;a random link&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates a link, each time you load the page, it will display&lt;br /&gt;one of two links: W3Schools.com! OR Refsnesdata.no! There is a 50% chance for&lt;br /&gt;each of them.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_buffer" target="_blank"&gt;Controlling&lt;br /&gt;the buffer&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how you can control the buffer.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_bufferclear" target="_blank"&gt;Clear&lt;br /&gt;the buffer&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how you can clear the buffer.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_end" target="_blank"&gt;End&lt;br /&gt;a script in the middle of processing and return the result&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to end a script in the middle of processing.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_expires" target="_blank"&gt;Set&lt;br /&gt;how many minutes a page will be cached in a browser before it expires&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to specify how many minutes a page will be cached&lt;br /&gt;in a browser before it expires.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_expiresabs" target="_blank"&gt;Set&lt;br /&gt;a date/time when a page cached in a browser will expire&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to specify a date/time a page cached in a browser&lt;br /&gt;will expire.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_isclientconnected" target="_blank"&gt;Check&lt;br /&gt;if the user is still connected to the server&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to check if a user is disconnected from the&lt;br /&gt;server.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_contenttype" target="_blank"&gt;Set&lt;br /&gt;the type of content&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to specify the type of content.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_charset" target="_blank"&gt;Set&lt;br /&gt;the name of the character set&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example demonstrates how to specify the name of the character set.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Response Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASP Response object is used to send output to the user&lt;br /&gt;from the server. Its collections, properties, and methods are described below:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Collections&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Collection&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/coll_cookies_response.asp"&gt;&lt;font size="1"&gt;Cookies&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Sets a cookie value. If the cookie does not exist, it&lt;br /&gt;        will be created, and take the value that is specified&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Properties&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Property&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_buffer.asp"&gt;&lt;font size="1"&gt;Buffer&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Specifies whether to buffer the page&lt;br /&gt;        output or not&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_cachecontrol.asp"&gt;&lt;font size="1"&gt;CacheControl&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets whether a proxy server can cache the&lt;br /&gt;        output generated by ASP or not&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_charset.asp"&gt;&lt;font size="1"&gt;Charset&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Appends the name of a character-set to the&lt;br /&gt;        content-type header in the Response object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_contenttype.asp"&gt;&lt;font size="1"&gt;ContentType&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets the HTTP content type for the&lt;br /&gt;        Response object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_expires.asp"&gt;&lt;font size="1"&gt;Expires&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets how long (in minutes) a page will be&lt;br /&gt;        cached on a browser before it expires&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_expiresabsolute.asp"&gt;&lt;font size="1"&gt;ExpiresAbsolute&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets a date and time when a page cached on&lt;br /&gt;        a browser will expire&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_isclientconnected.asp"&gt;&lt;font size="1"&gt;IsClientConnected&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Indicates if the client has disconnected&lt;br /&gt;        from the server&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_pics.asp"&gt;&lt;font size="1"&gt;Pics&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Appends a value to the PICS label response&lt;br /&gt;        header&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;a href="http://www.w3schools.com/ASP/prop_status.asp"&gt;&lt;font size="1"&gt;Status&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Specifies the value of the status line&lt;br /&gt;        returned by the server&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Methods&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;th align="left" width="25%"&gt;&lt;font size="1"&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th align="left" width="75%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_addheader.asp"&gt;&lt;font size="1"&gt;AddHeader&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Adds a new HTTP header and a value to the HTTP response&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_appendtolog.asp"&gt;&lt;font size="1"&gt;AppendToLog&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Adds a string to the end of the server log entry&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_binarywrite.asp"&gt;&lt;font size="1"&gt;BinaryWrite&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Writes data directly to the output without any&lt;br /&gt;        character conversion&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_clear.asp"&gt;&lt;font size="1"&gt;Clear&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Clears any buffered HTML output&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_end.asp"&gt;&lt;font size="1"&gt;End&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Stops processing a script, and returns the current&lt;br /&gt;        result&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_flush.asp"&gt;&lt;font size="1"&gt;Flush&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Sends buffered HTML output immediately&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_redirect.asp"&gt;&lt;font size="1"&gt;Redirect&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Redirects the user to a different URL&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://www.w3schools.com/ASP/met_write_response.asp"&gt;&lt;font size="1"&gt;Write&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td&gt;&lt;font size="1"&gt;Writes a specified string to the output&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-5326641881505599718?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/5326641881505599718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=5326641881505599718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/5326641881505599718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/5326641881505599718'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-response-object.html' title='ASP Response Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-3863257629031188604</id><published>2008-09-18T02:47:00.011-07:00</published><updated>2008-09-18T03:20:46.791-07:00</updated><title type='text'>ASP Sending e-mail with CDOSYS</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;CDOSYS is a built-in component in ASP. This&lt;br /&gt;component is used to send e-mails with ASP.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Sending e-mail with CDOSYS&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;CDO (Collaboration Data Objects) is a Microsoft technology&lt;br /&gt;that is designed to simplify the creation of messaging applications.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;CDOSYS is a built-in component in ASP. We will show you how to&lt;br /&gt;use this component to send e-mail with ASP.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How about CDONTs?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Microsoft has discontinued the use of CDONTs on Windows 2000,&lt;br /&gt;Windows XP and Windows 2003. If you have used CDONTs in your ASP applications,&lt;br /&gt;you should update the code and use the new CDO technology.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples using CDOSYS&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Sending a text e-mail:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Set myMail=CreateObject(&amp;quot;CDO.Message&amp;quot;)&lt;br /&gt;myMail.Subject=&amp;quot;Sending email with CDO&amp;quot;&lt;br /&gt;myMail.From=&amp;quot;mymail@mydomain.com&amp;quot;&lt;br /&gt;myMail.To=&amp;quot;someone@somedomain.com&amp;quot;&lt;br /&gt;myMail.TextBody=&amp;quot;This is a message.&amp;quot;&lt;br /&gt;myMail.Send&lt;br /&gt;set myMail=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Sending a text e-mail with Bcc and CC fields:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Set myMail=CreateObject(&amp;quot;CDO.Message&amp;quot;)&lt;br /&gt;myMail.Subject=&amp;quot;Sending email with CDO&amp;quot;&lt;br /&gt;myMail.From=&amp;quot;mymail@mydomain.com&amp;quot;&lt;br /&gt;myMail.To=&amp;quot;someone@somedomain.com&amp;quot;&lt;br /&gt;myMail.Bcc=&amp;quot;someoneelse@somedomain.com&amp;quot;&lt;br /&gt;myMail.Cc=&amp;quot;someoneelse2@somedomain.com&amp;quot;&lt;br /&gt;myMail.TextBody=&amp;quot;This is a message.&amp;quot;&lt;br /&gt;myMail.Send&lt;br /&gt;set myMail=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Sending an HTML e-mail:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Set myMail=CreateObject(&amp;quot;CDO.Message&amp;quot;)&lt;br /&gt;myMail.Subject=&amp;quot;Sending email with CDO&amp;quot;&lt;br /&gt;myMail.From=&amp;quot;mymail@mydomain.com&amp;quot;&lt;br /&gt;myMail.To=&amp;quot;someone@somedomain.com&amp;quot;&lt;br /&gt;myMail.HTMLBody = &amp;quot;&amp;lt;h1&amp;gt;This is a message.&amp;lt;/h1&amp;gt;&amp;quot; &lt;br /&gt;myMail.Send&lt;br /&gt;set myMail=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Sending an HTML e-mail that sends a webpage from a website:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Set myMail=CreateObject(&amp;quot;CDO.Message&amp;quot;)&lt;br /&gt;myMail.Subject=&amp;quot;Sending email with CDO&amp;quot;&lt;br /&gt;myMail.From=&amp;quot;mymail@mydomain.com&amp;quot;&lt;br /&gt;myMail.To=&amp;quot;someone@somedomain.com&amp;quot;&lt;br /&gt;myMail.CreateMHTMLBody &amp;quot;http://www.w3schools.com/asp/&amp;quot; &lt;br /&gt;myMail.Send&lt;br /&gt;set myMail=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Sending an HTML e-mail that sends a webpage from a file on&lt;br /&gt;your computer:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Set myMail=CreateObject(&amp;quot;CDO.Message&amp;quot;)&lt;br /&gt;myMail.Subject=&amp;quot;Sending email with CDO&amp;quot;&lt;br /&gt;myMail.From=&amp;quot;mymail@mydomain.com&amp;quot;&lt;br /&gt;myMail.To=&amp;quot;someone@somedomain.com&amp;quot;&lt;br /&gt;myMail.CreateMHTMLBody &amp;quot;file://c:/mydocuments/test.htm&amp;quot; &lt;br /&gt;myMail.Send&lt;br /&gt;set myMail=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Sending a text e-mail with an Attachment:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Set myMail=CreateObject(&amp;quot;CDO.Message&amp;quot;)&lt;br /&gt;myMail.Subject=&amp;quot;Sending email with CDO&amp;quot;&lt;br /&gt;myMail.From=&amp;quot;mymail@mydomain.com&amp;quot;&lt;br /&gt;myMail.To=&amp;quot;someone@somedomain.com&amp;quot;&lt;br /&gt;myMail.TextBody=&amp;quot;This is a message.&amp;quot;&lt;br /&gt;myMail.AddAttachment &amp;quot;c:\mydocuments\test.txt&amp;quot;&lt;br /&gt;myMail.Send&lt;br /&gt;set myMail=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Sending a text e-mail using a remote server:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Set myMail=CreateObject(&amp;quot;CDO.Message&amp;quot;)&lt;br /&gt;myMail.Subject=&amp;quot;Sending email with CDO&amp;quot;&lt;br /&gt;myMail.From=&amp;quot;mymail@mydomain.com&amp;quot;&lt;br /&gt;myMail.To=&amp;quot;someone@somedomain.com&amp;quot;&lt;br /&gt;myMail.TextBody=&amp;quot;This is a message.&amp;quot;&lt;br /&gt;myMail.Configuration.Fields.Item _&lt;br /&gt;(&amp;quot;http://schemas.microsoft.com/cdo/configuration/sendusing&amp;quot;)=2&lt;br /&gt;'Name or IP of remote SMTP server&lt;br /&gt;myMail.Configuration.Fields.Item _&lt;br /&gt;(&amp;quot;http://schemas.microsoft.com/cdo/configuration/smtpserver&amp;quot;) _&lt;br /&gt;=&amp;quot;smtp.server.com&amp;quot;&lt;br /&gt;'Server port&lt;br /&gt;myMail.Configuration.Fields.Item _&lt;br /&gt;(&amp;quot;http://schemas.microsoft.com/cdo/configuration/smtpserverport&amp;quot;) _&lt;br /&gt;=25 &lt;br /&gt;myMail.Configuration.Fields.Update&lt;br /&gt;myMail.Send&lt;br /&gt;set myMail=nothing&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-3863257629031188604?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/3863257629031188604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=3863257629031188604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/3863257629031188604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/3863257629031188604'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-sending-e-mail-with-cdosys.html' title='ASP Sending e-mail with CDOSYS'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-5446723756562048394</id><published>2008-09-18T02:47:00.010-07:00</published><updated>2008-09-18T03:18:00.623-07:00</updated><title type='text'>ASP The Global.asa file</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;The Global.asa file is an optional file that can&lt;br /&gt;contain declarations of objects, variables, and methods that can be accessed by&lt;br /&gt;every page in an ASP application.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The Global.asa file&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Global.asa file is an optional file that can contain&lt;br /&gt;declarations of objects, variables, and methods that can be accessed by every&lt;br /&gt;page in an ASP application. All valid browser scripts (JavaScript, VBScript,&lt;br /&gt;JScript, PerlScript, etc.) can be used within Global.asa.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Global.asa file can contain only the following:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Application events&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Session events&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&amp;lt;object&amp;gt; declarations&amp;nbsp;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;TypeLibrary declarations&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;the #include directive&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; The Global.asa file must be stored in the root&lt;br /&gt;directory of the ASP application, and each application can only have one&lt;br /&gt;Global.asa file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Events in Global.asa&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;In Global.asa you can tell the application and session objects&lt;br /&gt;what to do when the application/session starts and what to do when the&lt;br /&gt;application/session ends. The code for this is placed in event handlers. The&lt;br /&gt;Global.asa file can contain four types of events:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;b&gt;Application_OnStart&lt;/b&gt; - This event occurs when the FIRST&lt;br /&gt;user calls the first page from an ASP application. This event occurs after the&lt;br /&gt;Web server is restarted or after the Global.asa file is edited. The&lt;br /&gt;&amp;quot;Session_OnStart&amp;quot; event occurs immediately after this event.&lt;/font&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Session_OnStart&lt;/b&gt; - This event occurs EVERY time a NEW&lt;br /&gt;user requests his or her first page in the ASP application.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Session_OnEnd&lt;/b&gt; - This event occurs EVERY time a user&lt;br /&gt;ends a session. A user ends a session after a page has not been requested by the&lt;br /&gt;user for a specified time (by default this is 20 minutes).&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Application_OnEnd&lt;/b&gt; - This event occurs after the LAST&lt;br /&gt;user has ended the session. Typically, this event occurs when a Web server&lt;br /&gt;stops. This procedure is used to clean up settings after the Application stops,&lt;br /&gt;like delete records or write information to text files.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;A Global.asa file could look something like this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;script language=&amp;quot;vbscript&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;sub Application_OnStart&lt;br /&gt;  'some code&lt;br /&gt;end sub&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;sub Application_OnEnd&lt;br /&gt;  'some code&lt;br /&gt;end sub&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;sub Session_OnStart&lt;br /&gt;  'some code&lt;br /&gt;end sub&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;sub Session_OnEnd&lt;br /&gt;  'some code&lt;br /&gt;end sub&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; Because we cannot use the ASP script delimiters&lt;br /&gt;(&amp;lt;% and %&amp;gt;) to insert scripts in the Global.asa file, we put subroutines&lt;br /&gt;inside an HTML &amp;lt;script&amp;gt; element.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;&amp;lt;object&amp;gt; Declarations&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;It is possible to create objects with session or application&lt;br /&gt;scope in Global.asa by using the &amp;lt;object&amp;gt; tag.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; The &amp;lt;object&amp;gt; tag should be outside the&lt;br /&gt;&amp;lt;script&amp;gt; tag!&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Syntax&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;object runat=&amp;quot;server&amp;quot; scope=&amp;quot;scope&amp;quot; id=&amp;quot;id&amp;quot;&lt;br /&gt;{progid=&amp;quot;progID&amp;quot;|classid=&amp;quot;classID&amp;quot;}&amp;gt;&lt;br /&gt;....&lt;br /&gt;&amp;lt;/object&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="20%"&gt;&lt;font size="1"&gt;Parameter&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="80%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;scope&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Sets the scope of the object (either&lt;br /&gt;        Session or Application)&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;id&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Specifies a unique id for the object&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;ProgID&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;An id associated with a class id. The&lt;br /&gt;        format for ProgID is [Vendor.]Component[.Version]&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Either ProgID or ClassID must be specified.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;ClassID&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Specifies a unique id for a COM class&lt;br /&gt;        object.&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Either ProgID or ClassID must be specified.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The first example creates an object of session scope named&lt;br /&gt;&amp;quot;MyAd&amp;quot; by using the ProgID parameter:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;object runat=&amp;quot;server&amp;quot; scope=&amp;quot;session&amp;quot; id=&amp;quot;MyAd&amp;quot;&lt;br /&gt;progid=&amp;quot;MSWC.AdRotator&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/object&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The second example creates an object of application scope&lt;br /&gt;named &amp;quot;MyConnection&amp;quot; by using the ClassID parameter:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;object runat=&amp;quot;server&amp;quot; scope=&amp;quot;application&amp;quot; id=&amp;quot;MyConnection&amp;quot;&lt;br /&gt;classid=&amp;quot;Clsid:8AD3067A-B3FC-11CF-A560-00A0C9081C21&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/object&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The objects declared in the Global.asa file can be used by any&lt;br /&gt;script in the application:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;GLOBAL.ASA:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;object runat=&amp;quot;server&amp;quot; scope=&amp;quot;session&amp;quot; id=&amp;quot;MyAd&amp;quot;&lt;br /&gt;progid=&amp;quot;MSWC.AdRotator&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/object&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;You could reference the object &amp;quot;MyAd&amp;quot; from&lt;br /&gt;        any page in the ASP application:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;SOME .ASP FILE:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%=MyAd.GetAdvertisement(&amp;quot;/banners/adrot.txt&amp;quot;)%&amp;gt;&amp;nbsp;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;TypeLibrary Declarations&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;A TypeLibrary is a container for the contents of a DLL file&lt;br /&gt;corresponding to a COM object. By including a call to the TypeLibrary in the&lt;br /&gt;Global.asa file, the constants of the COM object can be accessed, and errors can&lt;br /&gt;be better reported by the ASP code. If your Web application relies on COM&lt;br /&gt;objects that have declared data types in type libraries, you can declare the&lt;br /&gt;type libraries in Global.asa.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Syntax&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;!--METADATA TYPE=&amp;quot;TypeLib&amp;quot;&lt;br /&gt;file=&amp;quot;filename&amp;quot;&lt;br /&gt;uuid=&amp;quot;typelibraryuuid&amp;quot;&lt;br /&gt;version=&amp;quot;versionnumber&amp;quot;&lt;br /&gt;lcid=&amp;quot;localeid&amp;quot;&lt;br /&gt;--&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="20%"&gt;&lt;font size="1"&gt;Parameter&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="80%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;file&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Specifies an absolute path to a type&lt;br /&gt;        library.&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Either the file parameter or the uuid parameter is&lt;br /&gt;        required&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;uuid&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Specifies a unique identifier for the type&lt;br /&gt;        library.&lt;/font&gt;&lt;br /&gt;        &lt;p&gt;&lt;font size="1"&gt;Either the file parameter or the uuid parameter is&lt;br /&gt;        required&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;version&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Optional. Used for selecting version. If&lt;br /&gt;        the requested version is not found, then the most recent version is used&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;lcid&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Optional. The locale identifier to be used&lt;br /&gt;        for the type library&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Error Values&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The server can return one of the following error messages:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="20%"&gt;&lt;font size="1"&gt;Error Code&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;      &lt;th vAlign="top" align="left" width="80%"&gt;&lt;font size="1"&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;ASP 0222&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Invalid type library specification&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;ASP 0223&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Type library not found&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;ASP 0224&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Type library cannot be loaded&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;ASP 0225&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;      &lt;td vAlign="top"&gt;&lt;font size="1"&gt;Type library cannot be wrapped&lt;/font&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; METADATA tags can appear anywhere in the&lt;br /&gt;Global.asa file (both inside and outside &amp;lt;script&amp;gt; tags). However, it is&lt;br /&gt;recommended that METADATA tags appear near the top of the Global.asa file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Restrictions&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Restrictions on what you can include in the Global.asa file:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;You can not display text that is written in the Global.asa&lt;br /&gt;    file. This file can't display information&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;You can only use Server and Application objects in the&lt;br /&gt;    Application_OnStart and Application_OnEnd subroutines. In the&amp;nbsp;Session_OnEnd&lt;br /&gt;    subroutine, you can use Server, Application, and Session objects. In the&lt;br /&gt;    Session_OnStart subroutine you can use any built-in object&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to use the Subroutines&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Global.asa is often used to initialize variables.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The example below shows how to detect the exact time a visitor&lt;br /&gt;first arrives on a Web site. The time is stored in a Session variable named&lt;br /&gt;&amp;quot;started&amp;quot;, and the value of the &amp;quot;started&amp;quot; variable can be&lt;br /&gt;accessed from any ASP page in the application:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;script language=&amp;quot;vbscript&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;sub Session_OnStart&lt;br /&gt;Session(&amp;quot;started&amp;quot;)=now()&lt;br /&gt;end sub&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Global.asa can also be used to control page access.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The example below shows how to redirect every new visitor to&lt;br /&gt;another page, in this case to a page called &amp;quot;newpage.asp&amp;quot;:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;script language=&amp;quot;vbscript&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;sub Session_OnStart&lt;br /&gt;Response.Redirect(&amp;quot;newpage.asp&amp;quot;)&lt;br /&gt;end sub&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;And you can include functions in the Global.asa file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;In the example below the Application_OnStart subroutine occurs&lt;br /&gt;when the Web server starts. Then the Application_OnStart subroutine calls&lt;br /&gt;another subroutine named &amp;quot;getcustomers&amp;quot;. The &amp;quot;getcustomers&amp;quot;&lt;br /&gt;subroutine opens a database and retrieves a record set from the&lt;br /&gt;&amp;quot;customers&amp;quot; table. The record set is assigned to an array, where it&lt;br /&gt;can be accessed from any ASP page without querying the database:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;script language=&amp;quot;vbscript&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;sub Application_OnStart&lt;br /&gt;getcustomers&lt;br /&gt;end sub&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;sub getcustomers&amp;nbsp;&lt;br /&gt;set conn=Server.CreateObject(&amp;quot;ADODB.Connection&amp;quot;)&lt;br /&gt;conn.Provider=&amp;quot;Microsoft.Jet.OLEDB.4.0&amp;quot;&lt;br /&gt;conn.Open &amp;quot;c:/webdata/northwind.mdb&amp;quot;&lt;br /&gt;set rs=conn.execute(&amp;quot;select name from customers&amp;quot;)&lt;br /&gt;Application(&amp;quot;customers&amp;quot;)=rs.GetRows&lt;br /&gt;rs.Close&lt;br /&gt;conn.Close&lt;br /&gt;end sub&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Global.asa Example&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;In this example we will create a Global.asa file that counts&lt;br /&gt;the number of current visitors.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;The Application_OnStart sets the Application variable&lt;br /&gt;    &amp;quot;visitors&amp;quot; to 0 when the server starts&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;The Session_OnStart subroutine adds one to the variable&lt;br /&gt;    &amp;quot;visitors&amp;quot; every time a new visitor arrives&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;The Session_OnEnd subroutine subtracts one from&lt;br /&gt;    &amp;quot;visitors&amp;quot; each time this subroutine is triggered&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Global.asa file:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;script language=&amp;quot;vbscript&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;Sub Application_OnStart&lt;br /&gt;Application(&amp;quot;visitors&amp;quot;)=0&lt;br /&gt;End Sub&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;Sub Session_OnStart&lt;br /&gt;Application.Lock&lt;br /&gt;Application(&amp;quot;visitors&amp;quot;)=Application(&amp;quot;visitors&amp;quot;)+1&lt;br /&gt;Application.UnLock&lt;br /&gt;End Sub&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;Sub Session_OnEnd&lt;br /&gt;Application.Lock&lt;br /&gt;Application(&amp;quot;visitors&amp;quot;)=Application(&amp;quot;visitors&amp;quot;)-1&lt;br /&gt;Application.UnLock&lt;br /&gt;End Sub&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To display the number of current visitors in an ASP file:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" cellPadding="3" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr vAlign="top"&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&lt;br /&gt;There are &amp;lt;%response.write(Application(&amp;quot;visitors&amp;quot;))%&amp;gt;&lt;br /&gt;online now!&lt;br /&gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-5446723756562048394?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/5446723756562048394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=5446723756562048394' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/5446723756562048394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/5446723756562048394'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-globalasa-file.html' title='ASP The Global.asa file'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-4339997056541450061</id><published>2008-09-18T02:47:00.009-07:00</published><updated>2008-09-18T03:17:11.463-07:00</updated><title type='text'>ASP Including Files</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;The #include directive is used to create&lt;br /&gt;functions, headers, footers, or elements that will be reused on multiple pages.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The #include Directive&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can insert the content of one ASP file into another ASP&lt;br /&gt;file before the server executes it, with the #include directive. The #include&lt;br /&gt;directive is used to create functions, headers, footers, or elements that will&lt;br /&gt;be reused on multiple pages.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to Use the #include Directive&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Here is a file called &amp;quot;mypage.asp&amp;quot;:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt; &lt;br /&gt;&amp;lt;body&amp;gt; &lt;br /&gt;&amp;lt;h3&amp;gt;Words of Wisdom:&amp;lt;/h3&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;!--#include file=&amp;quot;wisdom.inc&amp;quot;--&amp;gt;&amp;lt;/p&amp;gt; &lt;br /&gt;&amp;lt;h3&amp;gt;The time is:&amp;lt;/h3&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;!--#include file=&amp;quot;time.inc&amp;quot;--&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt; &lt;br /&gt;&amp;lt;/html&amp;gt; &lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Here is the &amp;quot;wisdom.inc&amp;quot; file:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;quot;One should never increase, beyond what is necessary,&lt;br /&gt;the number of entities required to explain anything.&amp;quot;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Here is the &amp;quot;time.inc&amp;quot; file:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Response.Write(Time)&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If you look at the source code in a browser, it will look&lt;br /&gt;something like this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h3&amp;gt;Words of Wisdom:&amp;lt;/h3&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;quot;One should never increase, beyond what is necessary,&lt;br /&gt;the number of entities required to explain anything.&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;h3&amp;gt;The time is:&amp;lt;/h3&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;11:33:42 AM&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Syntax for Including Files&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To include a file in an ASP page, place the #include directive&lt;br /&gt;inside comment tags:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;!--#include virtual=&amp;quot;somefilename&amp;quot;--&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;or&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;!--#include file =&amp;quot;somefilename&amp;quot;--&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;The Virtual Keyword&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Use the virtual keyword to indicate a path beginning with a&lt;br /&gt;virtual directory.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If a file named &amp;quot;header.inc&amp;quot; resides in a virtual&lt;br /&gt;directory named /html, the following line would insert the contents of&lt;br /&gt;&amp;quot;header.inc&amp;quot;:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;!-- #include virtual =&amp;quot;/html/header.inc&amp;quot; --&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;The File Keyword&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Use the file keyword to indicate a relative path. A relative&lt;br /&gt;path begins with the directory that contains the including file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If you have a file in the html directory, and the file&lt;br /&gt;&amp;quot;header.inc&amp;quot; resides in html\headers, the following line would insert&lt;br /&gt;&amp;quot;header.inc&amp;quot; in your file:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;!-- #include file =&amp;quot;headers\header.inc&amp;quot; --&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Note that the path to the included file (headers\header.inc)&lt;br /&gt;is relative to the including file. If the file containing this #include&lt;br /&gt;statement is not in the html directory, the statement will not work.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Tips and Notes&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;In the sections above we have used the file extension&lt;br /&gt;&amp;quot;.inc&amp;quot; for included files. Notice that if a user tries to browse an&lt;br /&gt;INC file directly, its content will be displayed. If your included file contains&lt;br /&gt;confidential information or information you do not want any users to see, it is&lt;br /&gt;better to use an ASP extension. The source code in an ASP file will not be&lt;br /&gt;visible after the interpretation. An included file can also include other files,&lt;br /&gt;and one ASP file can include the same file more than once.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Important:&lt;/b&gt; Included files are processed and inserted&lt;br /&gt;before the scripts are executed.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The following script will not work because ASP executes the&lt;br /&gt;#include directive before it assigns a value to the variable:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;fname=&amp;quot;header.inc&amp;quot;&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;!--#include file=&amp;quot;&amp;lt;%=fname%&amp;gt;&amp;quot;--&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You cannot open or close a script delimiter in an INC file.&lt;br /&gt;This script will not work:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;For i = 1 To n&lt;br /&gt;  &amp;lt;!--#include file=&amp;quot;count.inc&amp;quot;--&amp;gt;&lt;br /&gt;Next&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;But this script will work:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;% For i = 1 to n %&amp;gt;&lt;br /&gt;&amp;lt;!--#include file=&amp;quot;count.inc&amp;quot; --&amp;gt;&lt;br /&gt;&amp;lt;% Next %&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-4339997056541450061?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/4339997056541450061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=4339997056541450061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4339997056541450061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4339997056541450061'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-including-files.html' title='ASP Including Files'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-2462764256460004045</id><published>2008-09-18T02:47:00.008-07:00</published><updated>2008-09-18T03:16:28.174-07:00</updated><title type='text'>ASP Application Object</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;A group of ASP files that work together to&lt;br /&gt;perform some purpose is called an application. The Application object in ASP is&lt;br /&gt;used to tie these files together.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Application Object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;An application on the Web may be a group of ASP files. The ASP&lt;br /&gt;files work together to perform some purpose. The Application object in ASP is&lt;br /&gt;used to tie these files together.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Application object is used to store and access variables&lt;br /&gt;from any page, just like the Session object. The difference is that ALL users&lt;br /&gt;share one Application object, while with Sessions there is one Session object&lt;br /&gt;for EACH user.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Application object should hold information that will be&lt;br /&gt;used by many pages in the application (like database connection information).&lt;br /&gt;This means that you can access the information from any page. It also means that&lt;br /&gt;you can change the information in one place and the changes will automatically&lt;br /&gt;be reflected on all pages.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Store and Retrieve Application Variables&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Application variables can be accessed and changed by any page&lt;br /&gt;in the application.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can create Application variables in &amp;quot;Global.asa&amp;quot;&lt;br /&gt;like this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;script language=&amp;quot;vbscript&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;Sub Application_OnStart&lt;br /&gt;application(&amp;quot;vartime&amp;quot;)=&amp;quot;&amp;quot;&lt;br /&gt;application(&amp;quot;users&amp;quot;)=1&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;In the example above we have created two Application&lt;br /&gt;variables: &amp;quot;vartime&amp;quot; and &amp;quot;users&amp;quot;.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can access the value of an Application variable like this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;There are &lt;br /&gt;&amp;lt;%&lt;br /&gt;Response.Write(Application(&amp;quot;users&amp;quot;))&lt;br /&gt;%&amp;gt; &lt;br /&gt;active connections.&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Loop Through the Contents Collection&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Contents collection contains all application variables.&lt;br /&gt;You can loop through the Contents collection, to see what's stored in it:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;dim i&lt;br /&gt;For Each i in Application.Contents&lt;br /&gt;  Response.Write(i &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;)&lt;br /&gt;Next&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If you do not know the number of items in the Contents&lt;br /&gt;collection, you can use the Count property:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;dim i&lt;br /&gt;dim j&lt;br /&gt;j=Application.Contents.Count&lt;br /&gt;For i=1 to j&lt;br /&gt;  Response.Write(Application.Contents(i) &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;)&lt;br /&gt;Next&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Loop Through the StaticObjects Collection&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can loop through the StaticObjects collection, to see the&lt;br /&gt;values of all objects stored in the Application object:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;dim i&lt;br /&gt;For Each i in Application.StaticObjects&lt;br /&gt;  Response.Write(i &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;)&lt;br /&gt;Next&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Lock and Unlock&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can lock an application with the &amp;quot;Lock&amp;quot; method.&lt;br /&gt;When an application is locked, the users cannot change the Application variables&lt;br /&gt;(other than the one currently accessing it). You can unlock an application with&lt;br /&gt;the &amp;quot;Unlock&amp;quot; method. This method removes the lock from the Application&lt;br /&gt;variable:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Application.Lock&lt;br /&gt;  'do some application object operations&lt;br /&gt;Application.Unlock&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-2462764256460004045?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/2462764256460004045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=2462764256460004045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/2462764256460004045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/2462764256460004045'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-application-object.html' title='ASP Application Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-201582451827994870</id><published>2008-09-18T02:47:00.007-07:00</published><updated>2008-09-18T03:15:46.906-07:00</updated><title type='text'>ASP Session Object</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;The Session object is used to store information&lt;br /&gt;about, or change settings for a user session. Variables stored in the Session&lt;br /&gt;object hold information about one single user, and are available to all pages in&lt;br /&gt;one application.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The Session object&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;When you are working with an application, you open it, do some&lt;br /&gt;changes and then you close it. This is much like a Session. The computer knows&lt;br /&gt;who you are. It knows when you start the application and when you end. But on&lt;br /&gt;the internet there is one problem: the web server does not know who you are and&lt;br /&gt;what you do because the HTTP address doesn't maintain state.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;ASP solves this problem by creating a unique cookie for each&lt;br /&gt;user. The cookie is sent to the client and it contains information that&lt;br /&gt;identifies the user. This interface is called the Session object.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Session object is used to store information about, or&lt;br /&gt;change settings for a user session. Variables stored in the Session object hold&lt;br /&gt;information about one single user, and are available to all pages in one&lt;br /&gt;application. Common information stored in session variables are name, id, and&lt;br /&gt;preferences. The server creates a new Session object for each new user, and&lt;br /&gt;destroys the Session object when the session expires.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;When does a Session Start?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;A session starts when:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;A new user requests an ASP file, and the Global.asa file&lt;br /&gt;    includes a Session_OnStart procedure&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;A value is stored in a Session variable&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;A user requests an ASP file, and the Global.asa file uses&lt;br /&gt;    the &amp;lt;object&amp;gt; tag to instantiate an object with session scope&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;When does a Session End?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;A session ends if a user has not requested or refreshed a page&lt;br /&gt;in the application for a specified period. By default, this is 20 minutes.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If you want to set a timeout interval that is shorter or&lt;br /&gt;longer than the default, you can set the &lt;b&gt;Timeout&lt;/b&gt; property.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The example below sets a timeout interval of 5 minutes:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Session.Timeout=5&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To end a session immediately, you may use the &lt;b&gt;Abandon&lt;/b&gt;&lt;br /&gt;method:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Session.Abandon&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; The main problem with sessions is WHEN they&lt;br /&gt;should end. We do not know if the user's last request was the final one or not.&lt;br /&gt;So we do not know how long we should keep the session &amp;quot;alive&amp;quot;. Waiting&lt;br /&gt;too long for an idle session uses up resources on the server, but if the session&lt;br /&gt;is deleted too soon the user has to start all over again because the server has&lt;br /&gt;deleted all the information. Finding the right timeout interval can be&lt;br /&gt;difficult!&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Tip:&lt;/b&gt; If you are using session variables, store SMALL&lt;br /&gt;amounts of data in them.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Store and Retrieve Session Variables&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The most important thing about the Session object is that you&lt;br /&gt;can store variables in it.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The example below will set the Session variable &lt;i&gt;username&lt;/i&gt;&lt;br /&gt;to &amp;quot;Donald Duck&amp;quot; and the Session variable &lt;i&gt;age&lt;/i&gt; to&lt;br /&gt;&amp;quot;50&amp;quot;:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Session(&amp;quot;username&amp;quot;)=&amp;quot;Donald Duck&amp;quot;&lt;br /&gt;Session(&amp;quot;age&amp;quot;)=50&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;When the value is stored in a session variable it can be&lt;br /&gt;reached from ANY page in the ASP application:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;Welcome &amp;lt;%Response.Write(Session(&amp;quot;username&amp;quot;))%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The line above returns: &amp;quot;Welcome Donald Duck&amp;quot;.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can also store user preferences in the Session object, and&lt;br /&gt;then access that preference to choose what page to return to the user.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The example below specifies a text-only version of the page if&lt;br /&gt;the user has a low screen resolution:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%If Session(&amp;quot;screenres&amp;quot;)=&amp;quot;low&amp;quot; Then%&amp;gt;&amp;nbsp;&lt;br /&gt;  This is the text version of the page&lt;br /&gt;&amp;lt;%Else%&amp;gt;&amp;nbsp;&lt;br /&gt;  This is the multimedia version of the page&lt;br /&gt;&amp;lt;%End If%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Remove Session Variables&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Contents collection contains all session variables.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;It is possible to remove a session variable with the Remove&lt;br /&gt;method.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The example below removes the session variable&lt;br /&gt;&amp;quot;sale&amp;quot; if the value of the session variable &amp;quot;age&amp;quot; is lower&lt;br /&gt;than 18:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;If Session.Contents(&amp;quot;age&amp;quot;)&amp;lt;18 then&amp;nbsp;&lt;br /&gt;  Session.Contents.Remove(&amp;quot;sale&amp;quot;)&lt;br /&gt;End If&amp;nbsp;&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To remove all variables in a session, use the RemoveAll&lt;br /&gt;method:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Session.Contents.RemoveAll()&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Loop Through the Contents Collection&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Contents collection contains all session variables. You&lt;br /&gt;can loop through the Contents collection, to see what's stored in it:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Session(&amp;quot;username&amp;quot;)=&amp;quot;Donald Duck&amp;quot;&lt;br /&gt;Session(&amp;quot;age&amp;quot;)=50&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;dim i&lt;br /&gt;For Each i in Session.Contents&lt;br /&gt;  Response.Write(i &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;)&lt;br /&gt;Next&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Result:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;username&lt;br /&gt;age&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If you do not know the number of items in the Contents&lt;br /&gt;collection, you can use the Count property:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;dim i&lt;br /&gt;dim j&lt;br /&gt;j=Session.Contents.Count&lt;br /&gt;Response.Write(&amp;quot;Session variables: &amp;quot; &amp;amp; j)&lt;br /&gt;For i=1 to j&lt;br /&gt;  Response.Write(Session.Contents(i) &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;)&lt;br /&gt;Next&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Result:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;Session variables: 2&lt;br /&gt;Donald Duck&lt;br /&gt;50&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Loop Through the StaticObjects Collection&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can loop through the StaticObjects collection, to see the&lt;br /&gt;values of all objects stored in the Session object:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;dim i&lt;br /&gt;For Each i in Session.StaticObjects&lt;br /&gt;  Response.Write(i &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;)&lt;br /&gt;Next&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-201582451827994870?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/201582451827994870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=201582451827994870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/201582451827994870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/201582451827994870'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-session-object.html' title='ASP Session Object'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-441140830677935505</id><published>2008-09-18T02:47:00.006-07:00</published><updated>2008-09-18T03:14:35.344-07:00</updated><title type='text'>ASP Cookies</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;A cookie is often used to identify a user.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_cookies" target="_blank"&gt;Welcome&lt;br /&gt;cookie&lt;/a&gt;&lt;br&gt;&lt;br /&gt;How to create a Welcome cookie.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;What is a Cookie?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;A cookie is often used to identify a user. A cookie is a small&lt;br /&gt;file that the server embeds on the user's computer. Each time the same computer&lt;br /&gt;requests a page with a browser, it will send the cookie too. With ASP, you can&lt;br /&gt;both create and retrieve cookie values.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to Create a Cookie?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The &amp;quot;Response.Cookies&amp;quot; command is used to create&lt;br /&gt;cookies.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; The Response.Cookies command must appear BEFORE&lt;br /&gt;the &amp;lt;html&amp;gt; tag.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;In the example below, we will create a cookie named&lt;br /&gt;&amp;quot;firstname&amp;quot; and assign the value &amp;quot;Alex&amp;quot; to it:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Response.Cookies(&amp;quot;firstname&amp;quot;)=&amp;quot;Alex&amp;quot;&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;It is also possible to assign properties to a cookie, like&lt;br /&gt;setting a date when the cookie should expire:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Response.Cookies(&amp;quot;firstname&amp;quot;)=&amp;quot;Alex&amp;quot;&amp;nbsp;&lt;br /&gt;Response.Cookies(&amp;quot;firstname&amp;quot;).Expires=#May 10,2002#&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to Retrieve a Cookie Value?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The &amp;quot;Request.Cookies&amp;quot; command is used to retrieve a&lt;br /&gt;cookie value.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;In the example below, we retrieve the value of the cookie&lt;br /&gt;named &amp;quot;firstname&amp;quot; and display it on a page:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;fname=Request.Cookies(&amp;quot;firstname&amp;quot;)&lt;br /&gt;response.write(&amp;quot;Firstname=&amp;quot; &amp;amp; fname)&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Firstname=Alex&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;A Cookie with Keys&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If a&amp;nbsp; cookie contains a collection of multiple values, we&lt;br /&gt;say that the cookie has Keys.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;In the example below, we will create a cookie collection named&lt;br /&gt;&amp;quot;user&amp;quot;. The &amp;quot;user&amp;quot; cookie has Keys that contains information&lt;br /&gt;about a user:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Response.Cookies(&amp;quot;user&amp;quot;)(&amp;quot;firstname&amp;quot;)=&amp;quot;John&amp;quot;&lt;br /&gt;Response.Cookies(&amp;quot;user&amp;quot;)(&amp;quot;lastname&amp;quot;)=&amp;quot;Smith&amp;quot;&lt;br /&gt;Response.Cookies(&amp;quot;user&amp;quot;)(&amp;quot;country&amp;quot;)=&amp;quot;Norway&amp;quot;&lt;br /&gt;Response.Cookies(&amp;quot;user&amp;quot;)(&amp;quot;age&amp;quot;)=&amp;quot;25&amp;quot;&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Read all Cookies&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Look at the following code:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;Response.Cookies(&amp;quot;firstname&amp;quot;)=&amp;quot;Alex&amp;quot;&lt;br /&gt;Response.Cookies(&amp;quot;user&amp;quot;)(&amp;quot;firstname&amp;quot;)=&amp;quot;John&amp;quot;&lt;br /&gt;Response.Cookies(&amp;quot;user&amp;quot;)(&amp;quot;lastname&amp;quot;)=&amp;quot;Smith&amp;quot;&lt;br /&gt;Response.Cookies(&amp;quot;user&amp;quot;)(&amp;quot;country&amp;quot;)=&amp;quot;Norway&amp;quot;&lt;br /&gt;Response.Cookies(&amp;quot;user&amp;quot;)(&amp;quot;age&amp;quot;)=&amp;quot;25&amp;quot;&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Assume that your server has sent all the cookies above to a&lt;br /&gt;user.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Now we want to read all the cookies sent to a user. The&lt;br /&gt;example below shows how to do it (note that the code below checks if a cookie&lt;br /&gt;has Keys with the HasKeys property):&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;dim x,y&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;for each x in Request.Cookies&lt;br /&gt;  response.write(&amp;quot;&amp;lt;p&amp;gt;&amp;quot;)&lt;br /&gt;  if Request.Cookies(x).HasKeys then&lt;br /&gt;    for each y in Request.Cookies(x)&lt;br /&gt;      response.write(x &amp;amp; &amp;quot;:&amp;quot; &amp;amp; y &amp;amp; &amp;quot;=&amp;quot;&amp;nbsp;&amp;amp; Request.Cookies(x)(y))&lt;br /&gt;      response.write(&amp;quot;&amp;lt;br /&amp;gt;&amp;quot;)&lt;br /&gt;    next&lt;br /&gt;  else&lt;br /&gt;    Response.Write(x &amp;amp; &amp;quot;=&amp;quot; &amp;amp; Request.Cookies(x) &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;)&lt;br /&gt;  end if&lt;br /&gt;  response.write &amp;quot;&amp;lt;/p&amp;gt;&amp;quot;&lt;br /&gt;next&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;font size="1"&gt;Output:&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;firstname=Alex&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;user:firstname=John&lt;br&gt;&lt;br /&gt;user:lastname=Smith&lt;br&gt;&lt;br /&gt;user:country=Norway&lt;br&gt;&lt;br /&gt;user:age=25&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;What if a Browser Does NOT Support Cookies?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If your application deals with browsers that do not support&lt;br /&gt;cookies, you will have to use other methods to pass information from one page to&lt;br /&gt;another in your application. There are two ways of doing this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;1. Add parameters to a URL&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can add parameters to a URL:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;a href=&amp;quot;welcome.asp?fname=John&amp;amp;lname=Smith&amp;quot;&amp;gt;&lt;br /&gt;Go to Welcome Page&amp;lt;/a&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;And retrieve the values in the &amp;quot;welcome.asp&amp;quot; file&lt;br /&gt;like this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;fname=Request.querystring(&amp;quot;fname&amp;quot;)&lt;br /&gt;lname=Request.querystring(&amp;quot;lname&amp;quot;)&lt;br /&gt;response.write(&amp;quot;&amp;lt;p&amp;gt;Hello &amp;quot; &amp;amp; fname &amp;amp; &amp;quot; &amp;quot; &amp;amp; lname &amp;amp; &amp;quot;!&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;response.write(&amp;quot;&amp;lt;p&amp;gt;Welcome to my Web site!&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;2. Use a form&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can use a form. The form passes the user input to&lt;br /&gt;&amp;quot;welcome.asp&amp;quot; when the user clicks on the Submit button:&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;welcome.asp&amp;quot;&amp;gt;&lt;br /&gt;First Name:  &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;fname&amp;quot; value=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;Last Name: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;lname&amp;quot; value=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Retrieve the values in the &amp;quot;welcome.asp&amp;quot; file like&lt;br /&gt;this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%&lt;br /&gt;fname=Request.form(&amp;quot;fname&amp;quot;)&lt;br /&gt;lname=Request.form(&amp;quot;lname&amp;quot;)&lt;br /&gt;response.write(&amp;quot;&amp;lt;p&amp;gt;Hello &amp;quot; &amp;amp; fname &amp;amp; &amp;quot; &amp;quot; &amp;amp; lname &amp;amp; &amp;quot;!&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;response.write(&amp;quot;&amp;lt;p&amp;gt;Welcome to my Web site!&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;%&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-441140830677935505?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/441140830677935505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=441140830677935505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/441140830677935505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/441140830677935505'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-cookies.html' title='ASP Cookies'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-4127819432945560246</id><published>2008-09-18T02:47:00.005-07:00</published><updated>2008-09-18T03:13:54.618-07:00</updated><title type='text'>ASP Forms and User Input</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;The Request.QueryString and Request.Form&lt;br /&gt;commands may be used to retrieve information from forms, like user input.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_reqquery" target="_blank"&gt;A&lt;br /&gt;form with method=&amp;quot;get&amp;quot;&lt;/a&gt;&lt;br&gt;&lt;br /&gt;How to interact with the user, with the Request.QueryString command.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_simpleform" target="_blank"&gt;A&lt;br /&gt;form with method=&amp;quot;post&amp;quot;&lt;/a&gt;&lt;br&gt;&lt;br /&gt;How to interact with the user, with the Request.Form command.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_radiob" target="_blank"&gt;A&lt;br /&gt;form with radio buttons&lt;/a&gt;&lt;br&gt;&lt;br /&gt;How to interact with the user, through radio buttons, with the Request.Form&lt;br /&gt;command.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;User Input&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Request object may be used to retrieve user information&lt;br /&gt;from forms.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;font size="1"&gt;Form example:&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;form method=&amp;quot;get&amp;quot; action=&amp;quot;simpleform.asp&amp;quot;&amp;gt;&lt;br /&gt;First Name: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;fname&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;Last Name: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;lname&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;User input can be retrieved in two ways: With&lt;br /&gt;Request.QueryString or Request.Form.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Request.QueryString&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Request.QueryString command is used to collect values in a&lt;br /&gt;form with method=&amp;quot;get&amp;quot;. Information sent from a form with the GET&lt;br /&gt;method is visible to everyone (it will be displayed in the browser's address&lt;br /&gt;bar) and has limits on the amount of information to send.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If a user typed &amp;quot;Bill&amp;quot; and &amp;quot;Gates&amp;quot; in the&lt;br /&gt;form example above, the URL sent to the server would look like this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;http://www.w3schools.com/simpleform.asp?fname=Bill&amp;amp;lname=Gates&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Assume that the ASP file &amp;quot;simpleform.asp&amp;quot; contains&lt;br /&gt;the following script:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;body&amp;gt;&lt;br /&gt;Welcome &lt;br /&gt;&amp;lt;%&lt;br /&gt;response.write(request.querystring(&amp;quot;fname&amp;quot;))&lt;br /&gt;response.write(&amp;quot; &amp;quot; &amp;amp; request.querystring(&amp;quot;lname&amp;quot;))&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The browser will display the following in the body of the&lt;br /&gt;document:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;Welcome Bill Gates&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Request.Form&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The Request.Form command is used to collect values in a form&lt;br /&gt;with method=&amp;quot;post&amp;quot;. Information sent from a form with the POST method&lt;br /&gt;is invisible to others and has no limits on the amount of information to send.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If a user typed &amp;quot;Bill&amp;quot; and &amp;quot;Gates&amp;quot; in the&lt;br /&gt;form example above, the URL sent to the server would look like this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;http://www.w3schools.com/simpleform.asp&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Assume that the ASP file &amp;quot;simpleform.asp&amp;quot; contains&lt;br /&gt;the following script:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;body&amp;gt;&lt;br /&gt;Welcome &lt;br /&gt;&amp;lt;%&lt;br /&gt;response.write(request.form(&amp;quot;fname&amp;quot;))&lt;br /&gt;response.write(&amp;quot; &amp;quot; &amp;amp; request.form(&amp;quot;lname&amp;quot;))&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The browser will display the following in the body of the&lt;br /&gt;document:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;Welcome Bill Gates&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Form Validation&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;User input should be validated on the browser whenever&lt;br /&gt;possible (by client scripts). Browser validation is faster and you reduce the&lt;br /&gt;server load.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You should consider using server validation if the user input&lt;br /&gt;will be inserted into a database. A good way to validate a form on the server is&lt;br /&gt;to post the form to itself, instead of jumping to a different page. The user&lt;br /&gt;will then get the error messages on the same page as the form. This makes it&lt;br /&gt;easier to discover the error.&lt;/font&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-4127819432945560246?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/4127819432945560246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=4127819432945560246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4127819432945560246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4127819432945560246'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-forms-and-user-input.html' title='ASP Forms and User Input'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-4249060573495244089</id><published>2008-09-18T02:47:00.004-07:00</published><updated>2008-09-18T03:13:16.953-07:00</updated><title type='text'>ASP Procedures</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;In ASP you can call a JavaScript procedure from&lt;br /&gt;a VBScript and vice versa.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_vbproc" target="_blank"&gt;Call&lt;br /&gt;a procedure using VBScript&lt;/a&gt;&lt;br&gt;&lt;br /&gt;How to call a VBScript procedure from ASP.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_jsproc" target="_blank"&gt;Call&lt;br /&gt;a procedure using JavaScript&lt;/a&gt;&lt;br&gt;&lt;br /&gt;How to call a JavaScript procedure from ASP.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_vbproc2" target="_blank"&gt;Call&lt;br /&gt;procedures using VBScript&lt;/a&gt;&lt;br&gt;&lt;br /&gt;How to call both a JavaScript procedure and a VBScript procedure in an ASP file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Procedures&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The ASP source code can contain procedures and functions:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;%&lt;br /&gt;sub vbproc(num1,num2)&lt;br /&gt;response.write(num1*num2)&lt;br /&gt;end sub&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Result: &amp;lt;%call vbproc(3,4)%&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Insert the &amp;lt;%@ language=&amp;quot;&lt;i&gt;language&lt;/i&gt;&amp;quot; %&amp;gt;&lt;br /&gt;line above the &amp;lt;html&amp;gt; tag to write procedures or functions in another&lt;br /&gt;scripting language than default:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%@ language=&amp;quot;javascript&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;%&lt;br /&gt;function jsproc(num1,num2)&lt;br /&gt;{&lt;br /&gt;Response.Write(num1*num2)&lt;br /&gt;}&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Result: &amp;lt;%jsproc(3,4)%&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Differences Between VBScript and JavaScript&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;When calling a VBScript or a JavaScript procedure from an ASP&lt;br /&gt;file written in VBScript, you can use the &amp;quot;call&amp;quot; keyword followed by&lt;br /&gt;the procedure name. If a procedure requires parameters, the parameter list must&lt;br /&gt;be enclosed in parentheses when using the &amp;quot;call&amp;quot; keyword. If you omit&lt;br /&gt;the &amp;quot;call&amp;quot; keyword, the parameter list must not be enclosed in&lt;br /&gt;parentheses. If the procedure has no parameters, the parentheses are optional.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;When calling a JavaScript or a VBScript procedure from an ASP&lt;br /&gt;file written in JavaScript, always use parentheses after the procedure name.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-4249060573495244089?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/4249060573495244089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=4249060573495244089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4249060573495244089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/4249060573495244089'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-procedures.html' title='ASP Procedures'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-6345137300209577041</id><published>2008-09-18T02:47:00.003-07:00</published><updated>2008-09-18T03:12:35.517-07:00</updated><title type='text'>ASP Variables</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;A variable is used to store information.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;If the variable is declared outside a procedure&lt;br /&gt;it can be changed by any script in the ASP file. If the variable is declared&lt;br /&gt;inside a procedure, it is created and destroyed every time the procedure is&lt;br /&gt;executed.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_variable" target="_blank"&gt;Declare&lt;br /&gt;a variable&lt;/a&gt;&lt;br&gt;&lt;br /&gt;Variables are used to store information. This example demonstrates how to&lt;br /&gt;declare a variable, assign a value to it, and use the value in a text.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_array" target="_blank"&gt;Declare&lt;br /&gt;an array&lt;/a&gt;&lt;br&gt;&lt;br /&gt;Arrays are used to store a series of related data items. This example&lt;br /&gt;demonstrates how to declare an array that stores names.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_fornext2" target="_blank"&gt;Loop&lt;br /&gt;through the HTML headers&lt;/a&gt;&lt;br&gt;&lt;br /&gt;How to loop through the six headers in HTML.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_vbtime" target="_blank"&gt;Time-based&lt;br /&gt;greeting using VBScript&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example will display a different message to the user depending on the time&lt;br /&gt;on the server.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_jstime" target="_blank"&gt;Time-based&lt;br /&gt;greeting using JavaScript&lt;/a&gt;&lt;br&gt;&lt;br /&gt;This example is the same as the one above, but the syntax is different.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Lifetime of Variables&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;A variable declared outside a procedure can be accessed and&lt;br /&gt;changed by any script in the ASP file.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;A variable declared inside a procedure is created and&lt;br /&gt;destroyed every time the procedure is executed. No scripts outside the procedure&lt;br /&gt;can access or change the variable.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To declare variables accessible to more than one ASP file,&lt;br /&gt;declare them as session variables or application variables.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Session Variables&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Session variables are used to store information about ONE&lt;br /&gt;single user, and are available to all pages in one application. Typically&lt;br /&gt;information stored in session variables are name, id, and preferences.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;&lt;font size="1"&gt;Application Variables&lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Application variables are also available to all pages in one&lt;br /&gt;application. Application variables are used to store information about ALL users&lt;br /&gt;in a specific application.&lt;/font&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-6345137300209577041?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/6345137300209577041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=6345137300209577041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/6345137300209577041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/6345137300209577041'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-variables.html' title='ASP Variables'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-3910459783555410510</id><published>2008-09-18T02:47:00.002-07:00</published><updated>2008-09-18T03:11:48.077-07:00</updated><title type='text'>ASP Syntax</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;You cannot view the ASP source code by selecting&lt;br /&gt;&amp;quot;View source&amp;quot; in a browser, you will only see the output from the ASP&lt;br /&gt;file, which is plain HTML. This is because the scripts are executed on the&lt;br /&gt;server before the result is sent back to the browser.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="intro"&gt;&lt;font size="1"&gt;In our ASP tutorial, every example displays the&lt;br /&gt;hidden ASP source code. This will make it easier for you to understand how it&lt;br /&gt;works.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Examples&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_text" target="_blank"&gt;Write&lt;br /&gt;text with ASP&lt;/a&gt;&lt;br&gt;&lt;br /&gt;How to write some text with ASP.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;a href="http://www.w3schools.com/ASP/showasp.asp?filename=demo_formatting" target="_blank"&gt;Add&lt;br /&gt;some HTML to the text&lt;/a&gt;&lt;br&gt;&lt;br /&gt;How to format the text with HTML tags.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;The Basic Syntax Rule&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;An ASP file normally contains HTML tags, just like an HTML&lt;br /&gt;file. However, an ASP file can also contain &lt;b&gt;server scripts&lt;/b&gt;, surrounded by&lt;br /&gt;the delimiters &lt;b&gt;&amp;lt;%&lt;/b&gt; and &lt;b&gt;%&amp;gt;&lt;/b&gt;. Server scripts are &lt;b&gt;executed on&lt;br /&gt;the server, &lt;/b&gt;and can contain any expressions, statements, procedures, or&lt;br /&gt;operators valid for the scripting language you prefer to use.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Write Output to a Browser&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The response.write command is used to write output to a&lt;br /&gt;browser. The following example sends the text &amp;quot;Hello World&amp;quot; to the&lt;br /&gt;browser:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;span class="red"&gt;&amp;lt;%&lt;br /&gt;response.write(&amp;quot;Hello World!&amp;quot;)&lt;br /&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;There is also a shorthand method for the response.write&lt;br /&gt;command. The following example also sends the text &amp;quot;Hello World&amp;quot; to&lt;br /&gt;the browser:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" id="table1" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;span class="red"&gt;&amp;lt;%=&amp;quot;Hello World!&amp;quot;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;VBScript&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can use several scripting languages in ASP. However, the&lt;br /&gt;default scripting language is VBScript:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;span class="red"&gt;&amp;lt;%&lt;br /&gt;response.write(&amp;quot;Hello World!&amp;quot;)&lt;br /&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;The example above writes &amp;quot;Hello World!&amp;quot; into the&lt;br /&gt;body of the document.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;JavaScript&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To set JavaScript as the default scripting language for a&lt;br /&gt;particular page you must insert a language specification at the top of the page:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;table class="ex" cellSpacing="0" width="100%" border="1"&gt;&lt;br /&gt;  &lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;br /&gt;        &lt;pre&gt;&lt;font size="1"&gt;&amp;lt;%@ language=&amp;quot;javascript&amp;quot;%&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;span class="red"&gt;&amp;lt;%&lt;br /&gt;Response.Write(&amp;quot;Hello World!&amp;quot;)&lt;br /&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;      &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; Unlike VBScript - JavaScript is case sensitive.&lt;br /&gt;You will have to write your ASP code with uppercase letters and lowercase&lt;br /&gt;letters when the language requires it.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;Other Scripting Languages&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;ASP is shipped with VBScript and JScript (Microsoft's&lt;br /&gt;implementation of JavaScript). If you want to script in another language, like&lt;br /&gt;PERL, REXX, or Python, you will have to install script engines for them.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Important:&lt;/b&gt; Because the scripts are executed on the&lt;br /&gt;server, the browser that displays the ASP file does not need to support&lt;br /&gt;scripting at all!&lt;/font&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-3910459783555410510?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/3910459783555410510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=3910459783555410510' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/3910459783555410510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/3910459783555410510'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/asp-syntax.html' title='ASP Syntax'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-5797532919920834669</id><published>2008-09-18T02:47:00.001-07:00</published><updated>2008-09-18T02:52:47.000-07:00</updated><title type='text'>Run ASP on Your PC</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;You can run ASP on your own PC without an&lt;br /&gt;external server.&amp;nbsp;To do that, you must install Microsoft's Personal Web&lt;br /&gt;Server (PWS) or Internet Information Services (IIS) on your PC.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to Run ASP on your own PC&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;You can run ASP on your own PC without an external server.&amp;nbsp;To&lt;br /&gt;do that, you must install Microsoft's Personal Web Server (PWS) or Internet&lt;br /&gt;Information Services (IIS) on your PC.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;font size="1"&gt;If you are serious about using ASP, you should have at&lt;br /&gt;least Windows 98, Second Edition.&amp;nbsp;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;font size="1"&gt;If you are really serious about using ASP, you should go&lt;br /&gt;for Windows 2000.&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to install PWS and run ASP on Windows 95&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Personal Web Server (PWS) is not shipped with Windows 95 !!&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To run ASP on Windows 95, you will have to download&lt;br /&gt;&amp;quot;Windows NT 4.0 Option Pack&amp;quot; from Microsoft.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.microsoft.com/ntserver/nts/downloads/recommended/NT4OptPk/default.asp" target="_blank"&gt;&lt;font size="1"&gt;Download&lt;br /&gt;the &amp;quot;Windows NT 4.0 Option Pack&amp;quot;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to install PWS and run ASP on Windows NT&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Personal Web Server (PWS) is not shipped with Windows NT !!&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;To run ASP on Windows NT, you will have to download&lt;br /&gt;&amp;quot;Windows NT 4.0 Option Pack&amp;quot; from Microsoft.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.microsoft.com/ntserver/nts/downloads/recommended/NT4OptPk/default.asp" target="_blank"&gt;&lt;font size="1"&gt;Download&lt;br /&gt;the &amp;quot;Windows NT 4.0 Option Pack&amp;quot;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to install PWS and run ASP on Windows 98&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Open the &lt;b&gt;Add-ons&lt;/b&gt; folder on your Windows98 CD, find&lt;br /&gt;    the &lt;b&gt;PWS&lt;/b&gt; folder and run the &lt;b&gt;setup.exe&lt;/b&gt; file.&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;An &lt;b&gt;Inetpub folder&lt;/b&gt; will be created on your harddrive.&lt;br /&gt;    Open it and find the &lt;b&gt;wwwroot&lt;/b&gt; folder.&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&lt;b&gt;Create a new folder&lt;/b&gt;, like &amp;quot;MyWeb&amp;quot;, under&lt;br /&gt;    wwwroot.&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&lt;b&gt;Use a text editor&lt;/b&gt; to write some ASP code, save the&lt;br /&gt;    file as &amp;quot;test1.asp&amp;quot; in the &amp;quot;MyWeb&amp;quot; folder.&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Make sure your Web server is running - The installation&lt;br /&gt;    program has added a new icon on your task bar (this is the PWS symbol).&lt;br /&gt;    Click on the icon and press the Start button in the window that appears.&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&lt;b&gt;Open your browser&lt;/b&gt; and type in&lt;br /&gt;    &amp;quot;http://localhost/MyWeb/test1.asp&amp;quot;, to view your first ASP page.&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to install PWS and run ASP on Windows ME&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Personal Web Server (PWS) is not included with Windows Me !!&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://support.microsoft.com/support/kb/articles/Q266/4/56.ASP" target="_blank"&gt;&lt;font size="1"&gt;Read&lt;br /&gt;article from Microsoft&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://billsway.com/notes_public/PWS_WinMe.txt" target="_blank"&gt;&lt;font size="1"&gt;A&lt;br /&gt;workaround!&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to install IIS and run ASP on Windows 2000&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;From your &lt;b&gt;Start Button&lt;/b&gt;, go to &lt;b&gt;Settings&lt;/b&gt;, and &lt;b&gt;Control&lt;br /&gt;    Panel&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;In the Control Panel window select &lt;b&gt;Add/Remove Programs&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;In the Add/Remove window select &lt;b&gt;Add/Remove Windows&lt;br /&gt;    Components&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;In the Wizard window check &lt;b&gt;Internet Information Services&lt;/b&gt;,&lt;br /&gt;    &lt;b&gt;click OK&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;An &lt;b&gt;Inetpub folder&lt;/b&gt; will be created on your harddrive&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Open the Inetpub folder, and find a folder named &lt;b&gt;wwwroot&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&lt;b&gt;Create a new folder&lt;/b&gt;, like &amp;quot;MyWeb&amp;quot;, under&lt;br /&gt;    wwwroot.&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&lt;b&gt;Use a text editor&lt;/b&gt; to write some ASP code, save the&lt;br /&gt;    file as &amp;quot;test1.asp&amp;quot; in the &amp;quot;MyWeb&amp;quot; folder&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Make sure your Web server is running - The installation&lt;br /&gt;    program has added a new icon on your task bar (this is the IIS symbol).&lt;br /&gt;    Click on the icon and press the Start button in the window that appears.&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&lt;b&gt;Open your browser&lt;/b&gt; and type in&lt;br /&gt;    &amp;quot;http://localhost/MyWeb/test1.asp&amp;quot;, to view your first ASP page&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to install IIS and run ASP on Windows XP Professional&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;Note:&lt;/b&gt; You cannot run ASP on Windows XP Home Edition.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Insert the Windows XP Professional CD-Rom into your CD-Rom&lt;br /&gt;    Drive&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;From your &lt;b&gt;Start Button&lt;/b&gt;, go to &lt;b&gt;Settings&lt;/b&gt;, and &lt;b&gt;Control&lt;br /&gt;    Panel&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;In the Control Panel window select &lt;b&gt;Add/Remove Programs&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;In the Add/Remove window select &lt;b&gt;Add/Remove Windows&lt;br /&gt;    Components&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;In the Wizard window check &lt;b&gt;Internet Information Services&lt;/b&gt;,&lt;br /&gt;    &lt;b&gt;click OK&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;An &lt;b&gt;Inetpub folder&lt;/b&gt; will be created on your harddrive&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Open the Inetpub folder, and find a folder named &lt;b&gt;wwwroot&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&lt;b&gt;Create a new folder&lt;/b&gt;, like &amp;quot;MyWeb&amp;quot;, under&lt;br /&gt;    wwwroot.&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&lt;b&gt;Use a text editor&lt;/b&gt; to write some ASP code, save the&lt;br /&gt;    file as &amp;quot;test1.asp&amp;quot; in the &amp;quot;MyWeb&amp;quot; folder&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Make sure your Web server is running - its status can be&lt;br /&gt;    checked by going into the &lt;b&gt;Control Panel&lt;/b&gt;, then &lt;b&gt;Administrative Tools&lt;/b&gt;,&lt;br /&gt;    and double-click the &amp;quot;&lt;b&gt;IIS Manager&lt;/b&gt;&amp;quot; icon&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&lt;b&gt;Open your browser&lt;/b&gt; and type in&lt;br /&gt;    &amp;quot;http://localhost/MyWeb/test1.asp&amp;quot;, to view your first ASP page&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How to install IIS and run ASP on Windows Server 2003&lt;br /&gt;(Windows .NET Server)&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;When you start the Windows Server 2003, you should see the &lt;b&gt;Manage&lt;br /&gt;    Your Server wizard&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;If the wizard is not displayed, go to &lt;b&gt;Administrative&lt;br /&gt;    Tools, &lt;/b&gt;and select &lt;b&gt;Manage Your Server&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;In the wizard, click &lt;b&gt;Add or Remove a Role&lt;/b&gt;, click&lt;br /&gt;    Next&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Select &lt;b&gt;Custom Configuration&lt;/b&gt;, click Next&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Select &lt;b&gt;Application Server role&lt;/b&gt;, click Next&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Select &lt;b&gt;Enable ASP.NET&lt;/b&gt;, click Next&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Now, the wizard may ask for the &lt;b&gt;Server 2003 CD&lt;/b&gt;.&lt;br /&gt;    Insert the CD and let it run until it is finished, then click the Finish&lt;br /&gt;    button&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;The wizard should now show the Application Server role&lt;br /&gt;    installed&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Click on &lt;b&gt;Manage This Application Server&lt;/b&gt; to bring up&lt;br /&gt;    the &lt;b&gt;Application Server Management Console (MMC)&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Expand the &lt;b&gt;Internet Information Services (IIS) Manager&lt;/b&gt;,&lt;br /&gt;    then expand your server, and then the Web Sites folder&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;You should see the Default Web Site, and it should not say&lt;br /&gt;    (Stopped)&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;IIS is running!&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;In the &lt;b&gt;Internet Information Services (IIS) Manager &lt;/b&gt;click&lt;br /&gt;    on the &lt;b&gt;Web Service Extensions&lt;/b&gt; folder&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Here you will see that &lt;b&gt;Active Server Pages are&lt;br /&gt;    Prohibited&lt;/b&gt; (this is the default configuration of IIS 6)&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Highlight &lt;b&gt;Active Server Pages&lt;/b&gt; and click the &lt;b&gt;Allow&lt;/b&gt;&lt;br /&gt;    button&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;ASP is now active!&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-5797532919920834669?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/5797532919920834669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=5797532919920834669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/5797532919920834669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/5797532919920834669'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/run-asp-on-your-pc.html' title='Run ASP on Your PC'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7922643041724802726.post-6190351881167375569</id><published>2008-09-18T02:47:00.000-07:00</published><updated>2008-09-18T02:51:26.504-07:00</updated><title type='text'>Introduction to ASP</title><content type='html'>&lt;p class="intro"&gt;&lt;font size="1"&gt;An ASP file can contain text, HTML tags and&lt;br /&gt;scripts. Scripts in an ASP file are executed on the server&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;What you should already know&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Before you continue you should have some basic understanding&lt;br /&gt;of the following:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;HTML / XHTML&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;A scripting language like JavaScript or VBScript&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;If you want to study these subjects first, find the tutorials&lt;br /&gt;on our &lt;a href="http://www.w3schools.com/default.asp"&gt;Home page&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;What is ASP?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;ASP stands for &lt;b&gt;A&lt;/b&gt;ctive &lt;b&gt;S&lt;/b&gt;erver &lt;b&gt;P&lt;/b&gt;ages&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;ASP is a program that runs inside &lt;b&gt;IIS&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;IIS stands for &lt;b&gt;I&lt;/b&gt;nternet &lt;b&gt;I&lt;/b&gt;nformation &lt;b&gt;S&lt;/b&gt;ervices&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;IIS comes as a free component with &lt;b&gt;Windows 2000&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;IIS is also a part of the &lt;b&gt;Windows NT 4.0 Option Pack&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;The Option Pack can be &lt;b&gt;downloaded&lt;/b&gt; from Microsoft&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;&lt;b&gt;PWS&lt;/b&gt; is a smaller - but fully functional - version of&lt;br /&gt;    IIS&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;PWS can be found on your &lt;b&gt;Windows 95/98 CD&lt;/b&gt;&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h2&gt;&lt;b&gt;&lt;font size="1"&gt;ASP Compatibility&lt;/font&gt;&lt;/b&gt;&lt;/h2&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;ASP is a Microsoft Technology&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;To run IIS you must have Windows NT 4.0 or later&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;To run PWS you must have Windows 95 or later&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;ChiliASP is a technology that runs ASP without Windows OS&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;InstantASP is another technology that runs ASP without&lt;br /&gt;    Windows&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;What is an ASP File?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;An ASP file is just the same as an HTML file&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;An ASP file can contain text, HTML, XML, and scripts&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Scripts in an ASP file are executed on the server&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;An ASP file has the file extension &amp;quot;.asp&amp;quot;&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;How Does ASP Differ from HTML?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;When a browser requests an HTML file, the server returns&lt;br /&gt;    the file&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;When a browser requests an ASP file, IIS passes the request&lt;br /&gt;    to the ASP engine. The ASP engine reads the ASP file, line by line, and&lt;br /&gt;    executes the scripts in the file. Finally, the ASP file is returned to the&lt;br /&gt;    browser as plain HTML&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2&gt;&lt;font size="1"&gt;What can ASP do for you?&lt;/font&gt;&lt;/h2&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Dynamically edit, change or add any content of a Web page&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Respond to user queries or data submitted from HTML forms&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Access any data or databases and return the results to a&lt;br /&gt;    browser&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Customize a Web page to make it more useful for individual&lt;br /&gt;    users&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;The advantages of using ASP instead of CGI and Perl, are&lt;br /&gt;    those of simplicity and speed&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Provide security since your ASP code can not be viewed from&lt;br /&gt;    the browser&lt;/font&gt;&lt;br /&gt;  &lt;li&gt;&lt;font size="1"&gt;Clever ASP programming can minimize the network traffic&lt;/font&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="1"&gt;Important: Because the scripts are executed on the server, the&lt;br /&gt;browser that displays the ASP file does not need to support scripting at all!&lt;/font&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7922643041724802726-6190351881167375569?l=jonas-asp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonas-asp.blogspot.com/feeds/6190351881167375569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7922643041724802726&amp;postID=6190351881167375569' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/6190351881167375569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7922643041724802726/posts/default/6190351881167375569'/><link rel='alternate' type='text/html' href='http://jonas-asp.blogspot.com/2008/09/introduction-to-asp.html' title='Introduction to ASP'/><author><name>JONAS</name><uri>http://www.blogger.com/profile/10474648168375169789</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_658eXKP5Npw/SMZdSJ2w1QI/AAAAAAAAACo/msG2QZo7Txc/S220/1.JPG'/></author><thr:total>0</thr:total></entry></feed>
