Slide 6.1: Programming Exercise III: A simple online bookstore for store owners only
Slide 6.3: Microsoft ASP.NET
Home

Microsoft ASP (Active Server Pages)


ASP is a server-side scripting environment that you can use to create and run dynamic, interactive web server applications. With ASP, you can combine HTML pages, script commands, and COM (Component Object Model) components to create interactive web pages and web-based applications. The following is an ASP example:

<html><body>
  <form method="post" action="http://www.w3schools.com/simpleform.asp">
    Your name: <input type="text" name="fname" size="20" />
    <input type="submit" value="Submit" />
  </form>
  <%
    dim fname = Request.Form( "fname" )
    If  fname <> ""  Then
      Response.Write( "Hello " & fname & "!" )
      Response.Write( "How are you today?" )
    End If
  %>
</body></html>

An ASP file normally contains HTML tags, just like an HTML file. However, an ASP file can also contain server scripts, surrounded by the delimiters <% and %>. Server scripts are executed on the server, and can contain any expressions, statements, procedures, or operators valid for the scripting language you prefer to use.
Note that ASP.NET is the successor to ASP technology, but it is not ASP compatible.
You cannot view the ASP source code by selecting “View page source” in a browser, you will only see the output from the ASP file, which is plain HTML. This is because the scripts are executed on the server before the result is sent back to the browser.