ASP TALK l By l Nitin Sh arma

ASP TALK l By : l Nitin Sh arma l Anuj Sharma l Arvind Soni l Gaurav Bamania l Vishal Jain ASP 1

ASP §ASP stands for Active Server Pages. §ASP is a server side technology and hence can run on any browser §Combined with XML, COM and HTML, ASP can be used to create interactive web applications. ASP 2

STARTING WITH ASP Microsoft’s PWS (for Windows 95, 98, 2 k) and IIS for Windows. NT ) are needed to run ASP scripts. § Instant ASP and Chili!ASP which run on non-IIS servers like Apache , SWS, JWS § All scripts are kept in a default wwwroot or else the specified directory in the server. (same as our default servlet directory). § All asp scripts are kept in files having. asp extension. § ASP 3

Writing ASP Scripts ASP scripts are embedded in HTML pages and are executed by the server before being sent to the browser. § All ASP scripts are coded within <% and %> tags. l Lets move to writing ASP scripts…. . § ASP 4

A simple Date Script • l • • l To display the current date we write <% =date %> Here the “date” part tells the server to give the present date and “=“ tells it to display the same. Similarly for present time we have <% =now %>. In this we can apply functions to retrieve present month, hour, etc. With this we can do some cool things like link of the day with…… <a href= <%weekdayname(weekday(now))%>. htm>link of the day</a> ASP 5

ASP Scripts (contd. ) § ASP scripts can be written in any scripting language which is Active. Script compatible. § Vbscript , Javascript, Jscript are most commonly used languages. ASP 6

ASP Language Reference l Main features : - IF/THEN/ELSE • FOR/NEXT ; DO/LOOP • CASE/SELECT • Supports Subroutines • ASP 7

APPLICATIONS Form Processing. § Along with SSI (Server Side Includes ) we can include instructions from other files. for example : l <% name=request. form(“name”) if name=“nitin” then %> <!-- #include virtual=“file. htm” --> <% else %> <!-- #include virtual=“file 2. htm” -- > § ASP 8

Applications contd. § Open , Read and Create txt files. § Interaction with the databases. § Cookies and Session Objects. ASP 9

ASP and XML can be used to build smart pages. § The ASP script running on the server determines which browser the client is running. § If the browser is IE 5 then XML and XSL files are sent as it is to the client. § Otherwise the HTML page is created at the server and sent to the client. § ASP 10

COMPARISON WITH OTHER ENGINES ASP has its competition with Allaire’s Coldfusion, PHP development team’s PHP ans Apache’s Tomcat(JSP), Netscape’s Live. Wire (Server Side Javascript). § With backing from Microsoft ASP has access for the whole Windows API. § Along with COM (Component Object Model) and ADO(Active. X Data Objects) , database access has been made very easy. § ASP 11

THANK YOU ASP 12
- Slides: 12