This Season
 

How to Write a Script in ASP

ASP or Active Server Pages is a scripting language created by Microsoft back in 1996 as part of Internet Information Server (IIS) 2.0. With ASP, you can create web pages that are dynamic in nature and that allow the users to interact with the website. ASP is processed at the server level, and the results are then returned to the web browser. ASP can be as simple as writing, "Hello World! I'm learning how to write script in ASP," on a web page or as complex as submitting and retrieving data from a database like Microsoft Access or Microsoft SQL. Make sure your website hosting plan is Windows based and supports ASP.

Related Searches:
    Difficulty:
    Moderately Easy

    Instructions

      • 1

        Use either a text editor or a WYSIWYG editor to write your ASP code. You should have a functional understanding of HTML coding before attempting ASP scripting. As an example, Microsoft FrontPage is used to write code in this article, but Notepad works just as well. Make sure to save your files with the .asp extension and not .htm or .html; otherwise, the server will not process the ASP code and most likely will return an error message in the browser.

      • 2
        ASP coding using Notepad

        Write your code between the delimiters (the percent sign with brackets) <% %> so the server knows to process the code correctly and return the results to the browser.

      • 3
        ASP coding using Microsoft Frontpage

        Start your first line of code with the scripting language (in classic ASP) which by default is VBScript. Then you can continue with HTML coding and any other ASP scripting needed.
        <%@ Language=VBScript %>
        <html>
        <body>
        <% Response.Write "Wow! I'm Learning ASP" %>
        </body>
        </html>
        Example of connection to an Access Database using ASP:
        <%
        Set dbConn = Server.CreateObject("ADODB.Connection")
        dbConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("MyDatabase.mdb")
        Set rsCustomers = Server.CreateObject("ADODB.Recordset")
        rsCustomers.Open "SELECT * FROM Customers", dbConn,1,3
        %>

      • 4

        Teach yourself ASP by taking advantage of the many resources on the Internet that make it easy to create functional websites. There are many things you can accomplish with ASP to make your website a dynamic place for users.

    Tips & Warnings

    • You need to host your site with a hosting company that uses Windows-based servers that are compatible with ASP.

    Related Searches

    Resources

    Read Next:

    Comments

    You May Also Like

    • How to Write an ASP Script Program

      Microsoft Active Server Pages (ASP), or "Classic ASP," is a server-side scripting language for creating interactive Web pages. An ASP page is...

    • How to Write to a File in ASP From a Form

      Active Server Pages (ASP) is a server side-scripting language created by Microsoft. It allows web programmers a wide range of programmatic functionality...

    • How to Write My Own Script for a Counter

      An ASP hit counter is one of the most basic ways to track your website's traffic. Your hit count is automatically recorded...

    • How to Write a Radio Script

      Learning how to write a radio script is critical for proper execution of a radio performance. The script must include various cues...

    • How to Write Computer Code

      Computer languages are used to instruct computers to perform tasks that computers are ideal for, such a complex mathematics and processing large...

    • How to Write XLS Data in ASP

      Writing web content that opens up in Excel can be a fairly simple process involving two key actions. The first action is...

    • How to Write a Sonnet

      The sonnet, a 14-line poem, has two main types: English (or Shakespearean) and Italian (or Petrarchan). The poem's the thing-- follow these...

    • How to Write a Script for Data Post Processing

      Users fill out Web page forms for a variety of reasons: to download software, to register for websites and to purchase products....

    • How to Write HTML Code in Notepad

      Notepad is a simple text editor that comes free with Windows and lets you code simple documents to be used on a...

    • What is JavaScript Void?

      JavaScript is a programming language used over the web. Modern web browsers like Internet Explorer, Safari and Firefox all allow you to...

    Follow eHow

    Related Ads