How to Merge ASP With HTML

Merging ASP and HTML enables you to create a dynamic website with a wealth of information.
Below is an illustration of how to create an ASP page for classic ASP and ASP.NET 2.0 that show the login credentials of a user.

Instructions

    • 1

      Write the programming language you will use for the ASP code. Your options are VBScript, JavaScript and VB or C# for ASP.NET.

      Classic ASP
      <%@Language="VBSCript,"

      ASP.NET
      <%@Page Language="VB," %>

    • 2

      Name the HTML Header and part of BODY section
      <HTML>
      <HEAD>
      <TITLE>Login Page</TITLE>
      </HEAD>

    • 3

      Begin the BODY section

      <BODY BGCOLOR="White" TOPMARGIN="10" LEFTMARGIN="10">

      <FONT SIZE="4" FACE="ARIAL, HELVETICA">
      <B>Login Page</B></FONT><BR>

      <HR SIZE="1" COLOR="#000000">

    • 4

      Put ASP code within the HTML text
      <!--Display LOGON_USER Server variable. -->

      You logged in as user:<B> <%= Request. ServerVariables ("LOGON_USER") %></B>

      <!--Display AUTH_TYPE Server variable. -->

      <P>You were authenticated using:<B> <%= Request.ServerVariables("AUTH_TYPE")%></B> authentication. </P>

    • 5

      Insert the closing Tags for BODY and HTML
      </BODY>
      </HTML>

    • 6

      Save the file. Use .asp for classic ASP file and .aspx for ASP.NET file.
      e.g UserCredential.asp or UserCredential.aspx

Tips & Warnings

  • <% %> is a pair of tags. They are used to specify a code section as an ASP code.

  • From classic ASP to ASP.NET 2.0, there are several versions of ASP and they all require similar steps when merging ASP code and HTML text.

Related Searches:

Comments

You May Also Like

Related Ads

Featured