Free Articles, Free Web Content, Reprint Articles
Tuesday, October 22, 2019
 
Free Articles, Free Web Content, Reprint ArticlesRegisterAll CategoriesTop AuthorsSubmit Article (Article Submission)ContactSubscribe Free Articles, Free Web Content, Reprint Articles
 

Learning ASP Series -- Your First ASP Page

ASP pages (Active Server Pages page sounds a bit ... butits easier to refer to them like this) are nothing but web ... ... is that they have an ... .ASP and you writethe co

ASP pages (Active Server Pages page sounds a bit melodramatic but
its easier to refer to them like this) are nothing but web pages.
The difference is that they have an extension .ASP and you write
the code in a Server Side Scripting language.

Do we know what's Server Side Scripting? This doesn't actually
matter if we delve into such nitty-gritty, but let's sound a bit
philosophically intellectual. Now, there are two sorts of
scripting languages:

Server Side (the hosting server where all the pages and programs
reside)

Client Side (the web surfer using the browser - actually the
browser is the client)

No, we are not talking about some corporate politics with all
this "siding" talk. Ok, before I begin with my bad sense of
humor, "Client Side Scripting" is what we generally see when we
code basic Java Scripts in our web pages to validate HTML forms
or implementing those cool image rollover effects or opening
custom popup windows etc. When you view the source of an HTML
page, and if the Java Script has been written in the page itself
(they have external Java Scripts too, but then that's a different
story), then you can see the script with all it's gory details. A
simple example of a Client Side Script written in Java Script is:



And then you can use it when the page loads:





A Server Side Script, on the other hand, does not manifest itself
when you try to use the "View Source" option of your browser. It
is a server side matter so unless you have the actual access to
the server, you cannot view the portion containing the server
side coding. But yes, the rest of the HTML matter is visible.

A typical ASP page looks like:

==> Page Begins <==

<%@Language=VBScript%>
<% Option Explicit %>


<br>< itle><br></head><br><body><br><%<br>Dim SayThis<br>SayThis = "Finally, I'm learning ASP!"<br>Response.Write SayThis<br>%><br></body><br></html><br><br>==> Page Ends <==<br><br>Provided you've configured your PWS in an amicable manner, this<br>docile file should show up without fuss. You can copy/paste this<br>page as it is using your preferred editor, and save the file as<br>"basic.asp".<br><br>As you know, a basic HTML web page begins with the <html> tag,<br>when you begin to work with an ASP page, try to make the first<br>line as:<br><br><%@Language=VBScript%><br><% Option Explicit %><br><br>The first line tells the concerned authorities that the following<br>code is going to contain VBScript syntax.<br><br>The second line forces us to declare every variable before we use<br>it. We'll come back to this later when we are in a more aware<br>state of mind.<br><br>My preferred script for ASP is VBScript, so most of my ponderings<br>will be in this language. A few daredevils write their ASP pages<br>in Perl too, but personally I feel it is an overkill and they are<br>just trying to either show off or the features they want to use<br>only exist in Perl. For that matter, even C++ is used for making<br>ASP pages.<br><br>Anyway, done with the first line, are we?<br><br>As you can observe, we have all the quintessential HTML tags in<br>an ASP page too, but they are only necessary if you intend to<br>display the page to your visitors. If the page just includes a<br>script that performs some programming function and then loads<br>some other page, you can simply have the pure ASP code with first<br>line as <% and the last line is %>.<br><br>==> End of Chapter Two <==<br><br>Note to the Reader: If you found this chapter useful<a href="http://www.articlesfactory.com"><img src="http://www.articlesfactory.com/pic/x.gif" alt="Free Articles" border="0"></a>, please let<br>me know at mailto:amrit@bytesworth.com. <p class="txt-small-regular"> Article Tags: <a href="http://www.articlesfactory.com/search/Server+Side/" class="right-link">Server Side</a>, <a href="http://www.articlesfactory.com/search/Side+Scripting/" class="right-link">Side Scripting</a> </p> <!-- google_ad_section_end --> <p class="txt-small-regular">Source: <a href="http://www.articlesfactory.com" class="small-link" title="Free Articles">Free Articles</a> from ArticlesFactory.com</p> <table> <tr> <td valign="top"><g:plusone size="medium" count="false"></g:plusone></td> <td valign="top"><div class="fb-like" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div></td> <tr> </table> <p> <h1>ABOUT THE AUTHOR</h1> <br> <div>Amrit Hallan is a freelance web designer. For all web site<br>development and web promotion needs, you can get in touch with<br>him at http://www.bytesworth.com. For more such articles,<br>visit http://www.bytesworth.com/articles and<br>http://www.bytesworth.com/learn.<br></div> </p> <center> <!-- ValueClick Media 300x250 Medium Rectangle CODE for articlesfactory.com --> <script language="javascript" src="http://media.fastclick.net/w/get.media?sid=20894&m=6&tp=8&d=j&t=n"></script> <noscript><a href="http://media.fastclick.net/w/click.here?sid=20894&m=6&c=1" target="_blank"> <img src="http://media.fastclick.net/w/get.media?sid=20894&m=6&tp=8&d=s&c=1" width=300 height=250 border=1></a></noscript> <!-- ValueClick Media 300x250 Medium Rectangle CODE for articlesfactory.com --> </center> <!-- Kontera ContentLink --> <SCRIPT LANGUAGE="JavaScript"> var dc_UnitID = 14; var dc_PublisherID = 3523; var dc_AdLinkColor = '#990000'; var dc_underlineType = 'solid'; var dc_open_new_win = 'yes'; var dc_adprod='ADL'; </SCRIPT> <SCRIPT LANGUAGE="JavaScript" SRC="http://kona.kontera.com/javascript/lib/KonaLibInline.js"></SCRIPT> <!-- Kontera ContentLink --> <br> <br> </div> </td> </tr> <tr> <td width="131" height="24" bgcolor="#EDE9E3" valign="top"> <table width="131" height="24" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/health.html" class="left-menu-inactive">Health</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/business.html" class="left-menu-inactive">Business</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/finance.html" class="left-menu-inactive">Finance</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/travel.html" class="left-menu-inactive">Travel</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/technology.html" class="left-menu-inactive">Technology</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/home-repair.html" class="left-menu-inactive">Home Repair</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/computers.html" class="left-menu-inactive">Computers</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/marketing.html" class="left-menu-inactive">Marketing</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/autos.html" class="left-menu-inactive">Autos</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/family.html" class="left-menu-inactive">Family</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/entertainment.html" class="left-menu-inactive">Entertainment</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/law.html" class="left-menu-inactive">Law</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/education.html" class="left-menu-inactive">Education</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/communication.html" class="left-menu-inactive">Communication</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/other.html" class="left-menu-inactive">Other</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/sports.html" class="left-menu-inactive">Sports</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/ecommerce.html" class="left-menu-inactive">ECommerce</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/home-business.html" class="left-menu-inactive">Home Business</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/self-help.html" class="left-menu-inactive">Self Help</a></td> </tr> <tr> <td height="24" background="http://www.articlesfactory.com/pic/left_menu_inactive.gif"><a href="http://www.articlesfactory.com/articles/internet.html" class="left-menu-inactive">Internet</a></td> </tr> </table> <table width="131" height="11" border="0" cellspacing="0" cellpadding="0" bgcolor="#EDE9E3"> <tr> <td height="11" align="right"><img src="http://www.articlesfactory.com/pic/right_curve.gif" width="12" height="11" alt="" border="0"></td> </tr> </table> <!-- google_ad_section_start(weight=ignore) --> <div class="left-section"><b>Partners</b></div> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="http://www.articlesfactory.com/pic/x.gif" width="15" height="1" alt="" border="0"></td> <td valign="top"><img src="http://www.articlesfactory.com/pic/left_menu_bullet.gif" width="8" height="10" alt="" border="0"></td> <td><div class="left-section-link"><a class="left-section-link" href="http://www.bailfish.com" target="_blank" rel="nofollow">California Bail Bonds Bounty Hunters</a></div></td> </tr> <tr> <td><img src="http://www.articlesfactory.com/pic/x.gif" width="15" height="1" alt="" border="0"></td> <td valign="top"><img src="http://www.articlesfactory.com/pic/left_menu_bullet.gif" width="8" height="10" alt="" border="0"></td> <td><div class="left-section-link"><a class="left-section-link" href="http://www.kateraynor.com" target="_blank" rel="nofollow">Immigration Attorney</a></div></td> </tr> <tr> <td><img src="http://www.articlesfactory.com/pic/x.gif" width="15" height="1" alt="" border="0"></td> <td valign="top"><img src="http://www.articlesfactory.com/pic/left_menu_bullet.gif" width="8" height="10" alt="" border="0"></td> <td><div class="left-section-link"><a class="left-section-link" href="http://www.movingcompanies.tv" target="_blank" rel="nofollow">Moving Relocation Services</a></div></td> </tr> <tr> <td><img src="http://www.articlesfactory.com/pic/x.gif" width="15" height="1" alt="" border="0"></td> <td valign="top"><img src="http://www.articlesfactory.com/pic/left_menu_bullet.gif" width="8" height="10" alt="" border="0"></td> <td><div class="left-section-link"><a class="left-section-link" href="http://caraudiosecurity.com/shop/home.html" target="_blank" rel="nofollow">Alpine Car Audio</a></div></td> </tr> <tr> <td><img src="http://www.articlesfactory.com/pic/x.gif" width="15" height="1" alt="" border="0"></td> <td valign="top"><img src="http://www.articlesfactory.com/pic/left_menu_bullet.gif" width="8" height="10" alt="" border="0"></td> <td><div class="left-section-link"><a class="left-section-link" href="http://www.citrusfresh.com" target="_blank" rel="nofollow">Carpet Cleaning Los Angeles</a></div></td> </tr> </table> <div align="center"> <script id="mNCC" language="javascript"> medianet_width='120'; medianet_height= '600'; medianet_crid='627327646'; </script> <script id="mNSC" src="http://contextual.media.net/nmedianet.js?cid=8CUIRZYTL" language="javascript"></script> </div> <br> <br> <!-- google_ad_section_end(weight=ignore) --> </td> </tr> </table> <table width="750" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td height="50"> <div class="small-link" align="center"> <a class="small-link" href="http://www.articlesfactory.com/">Free Articles Home</a> | <a class="small-link" href="http://www.articlesfactory.com/signup.html">Register</a> | <a class="small-link" href="http://www.articlesfactory.com/submit.html">Submit an Article</a> | <a class="small-link" href="http://www.articlesfactory.com/links.html">Links</a> | <a class="small-link" href="http://www.articlesfactory.com/contact.html">Contact</a> | <a class="small-link" href="http://www.articlesfactory.com/archive.html">Archive</a> | <a class="small-link" href="http://www.articlesfactory.com/rss.html"><img src="http://www.articlesfactory.com/pic/icon-xml-rss_red.gif" width="52" height="13" alt="XML/RSS Feed" border="0" align="middle"></a> </div> <div class="small-link" align="center"> <a class="small-link" href="http://www.articlesfactory.com/terms.html">Terms of Service</a> | <a class="small-link" href="http://www.articlesfactory.com/privacy.html">Privacy Policy</a> </div> </td> </tr> </table> <!-- Start of StatCounter Code --> <script type="text/javascript" language="javascript"> <!-- var sc_project=479039; var sc_invisible=1; var sc_partition=3; var sc_security=""; //--> </script> <script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><img src="http://c4.statcounter.com/counter.php?sc_project=479039&java=0&security=&invisible=1" alt="free web stats" border="0"></noscript> <!-- End of StatCounter Code --> <!-- Start of Google Analytics Code --> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-88528-1"; urchinTracker(); </script> <!-- End of Google Analytics Code --> <script> //window.resizeTo(1024, 768); //window.resizeTo(800, 600); </script> </body> </html><div class="small" align="center">Page loaded in 0.046 seconds</div>