Switch to full style
ASP Technology Tutorials Written By Members.
Post a reply

ASP file structure

Sun May 13, 2012 10:32 pm

To run ASP, you first will need IIS web server. We assume that the root of server is C:/mywebpage. Let’s “firstpage.asp” to be our first asp web page file, in order to run this file , set the URL of web browser to :
Code:
http://localhost/ firstpage.asp

Note you have to set the ISS setting to point to C:/mywebpage as default root. Now, how our file first? We start the web page by telling the application server that we are using VB-script:
Code:
<%@ Language=VBScript %>

In this case we are using VBScript for asp server side programming. The next part is the declarations of variables to be used later in our application.
Code:
<% Option Explicit %>

Following show declaration of a variable and assigning a string value to it, we define the variable using
“Dim” command.
Dim myMsg
myMsg =”My string”
You can print the content of this variable using “Response” object and “Write” function. Following is full and simple example, as you notice that the VB-script code is embedded with HTML code:
Code:
<%@ Language=VBScript %>
<%
 Option Explicit %>

<
html>
<
head>
<
title>Page Title</title>
</
head>

<
body >

<%
Dim myMsg 
myMsg 
=”My string”
Response
.Write myMsg
%>

</
body>
</
html>
 




Post a reply
  Related Posts  to : ASP file structure
 c++/data structure     -  
 What is the size of this Structure     -  
 Display data from database as Tree Structure in JSP     -  
 program using structure to store roll number,name     -  
 Encrypt/Decrypt a file from source file to target file.     -  
 Copy file to file in java code- implementation     -  
 getting file name of html input file tag using jsp     -  
 file descriptor vs file pointer     -  
 How to convert xml file to Pdf file using C     -  
 C++ File I/O     -  

Topic Tags

ASP Basics