What is Active Server Page(asp)???

Zugzwang152

Lifer
Oct 30, 2001
12,134
1
0
ASP is a server-side scripting language, much like PHP and Perl. The code is executed by the web server and returns plain HTML, so the user cannot see your source, just the HTML end product. Javascript ont he other hand, is executed on the client by the web browser. The user can see exactly what you wrote in Javascript and steal your code and other sensitive information like database usernames and passwords.

ASP is developed by Microsoft and will run only on a Windows platform with Microsoft's IIS web server.

PHP and Perl will run on virtually any platform with most any web server (usually Apache).
 

Stalker

Member
Oct 9, 1999
193
0
0
but I see code like this which consist of javascript(1) or VBscript(2) way of declaring variable & etc

(1)
<%
// *** Edit Operations: declare variables
// set the form action variable
var MM_editAction = Request.ServerVariables("SCRIPT_NAME");
if (Request.QueryString) {
MM_editAction += "?" + Request.QueryString;
}
// boolean to abort record edit
var MM_abortEdit = false;
// query string to execute
var MM_editQuery = "";
%>

(2)
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_Merchant_STRING
Recordset1.Source = "SELECT * FROM CATEGORY"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
The original asp (prior to .net) was written in javascript (or vbscript). I think that's what you're getting at, Stalker. Like you showed, anything written between the <% and %> is interpreted on the server side, although I believe you need something special to use javascript, since the default is vb. But asp (not .net) is pretty dated.
 

bunker

Lifer
Apr 23, 2001
10,572
0
71
ASP can be written in either javascript or vbscript. When you look at a raw .asp page you will see code in between <% %>.

That code is parsed by the server, the client (web browser) never sees it.