What is ASP?
Page Three
Writing ASP pages requires that you work directly with HTML. ASP can use Visual Basic Script Commands (vbscript), Structured Query Language (SQL), and other programming formats. ASP code is separated from HTML by using a <% to begin an ASP sequence and %> to end the ASP sequence.
ASP can be embedded within HTML and HTML can be embedded within ASP (see example). Both sets of code produce the same result when displayed by a browser. But if you look closely, you will see that first example has ASP embedded within the HTML. Thus, you see regular HTML tags (such as <b> and </b> to begin and end bold text) with <% and %> interspersed among them. Anything between the <% %> tags is ASP code that has been embedded within the HTML.
<%Response.Write dbRs.Fields("Country")%> is an ASP command. Response.Write means to display what follows. dbRs.Fields("Country") means a database field called country. Thus, this command tells the server to pull information from the country database field called country and to display it on the web page (A number of other commands must be given to tell the server exactly what information to find but this gives you the idea.).
In the second example you see that the HTML commands are embedded within ASP. Thus, the line starts and ends with the ASP tags (<% and %>) and any HTML is surrounded by quote marks "<b>" to separate them from the ASP code.
But you don't have to do everything by writing HTML tags. You can use an HTML editor to do regular HTML and only need to go into the HTML when you need to write the ASP code. So, you can set a page up with your WYSIWYG editor and then insert ASP afterwards.
Later, we will also see how FrontPage Wizards allow you to develop ASP code without having to write every line of the code but, because the wizards are limited in what they allow you to do, it is still important to learn to work directly with ASP.
One of the best ways to do this is to look at examples. You will find a link to a Sample ASP Code page on every level. Each of the grey areas is clickable and will give you more information about the code it covers.