Asp (Part-II) Interview Questions and Answers

What is a FileSystemObject object?
It provides access to the physical file system of the web server. It gets and manipulates information about all drives in a server, folders and sub-folders on a drive and files inside a folder.

What is a Scripting Language?
It permits to create more interactive Web Pages. Validation, formatting of web pages can be done. VBScript, JavaScript are some examples.

What is a Dictionary object?
It lets you store and retrieve information in a flexible data structure. Each value or information stored in a Dictionary is associated with a key through which the information can be retrieved.


What is Global.asa file?
It is text file that contains details about an ASP application, such as when it should begin and end.

What is an .ASP file?
It is a Text File that contains the combination of the following:
Text
HTML tags
Script Commands

What is Response Object?
It controls the information sent to the user. The various methods are:
Response.Write - Sends information directly to a browser
Response.Redirect - Directs a user to a URL other than the requested URL
Response.ContentType - Controls the type of content sent
Response.Cookies - Sets cookie values
Response.Buffer - To Buffer information

Naming constraints for a variable ?
It can be up to 255 characters Must start with an alphabet Must not contain an embedded period or full-stop


What is a TextStream object?
It allows you to access(read/write) the contents of text files stored on the web server.


What is IIS?
IIS is a Web Server that provides Web services, not only for web pages but also for ftp sites and video and audio services. It integrates with the database facilities of SQL Server.


What is Request Object?
Gets information from the user. It has five collections by which values can be accessed. They are: Query string, Form, Cookies, Server Variables & Client Certificate

What are the special sub-types in VBScript?
EMPTY: has no value
NULL: Value does not exist (conjunction with database)
OBJECT:

What is Cookies collection?
Cookies are text files that store information about the user by which the web server identifies and marks each different visitor to a web site and determines where a user has been before. A cookie can store information only when the user sends it. Individual cookies are limited to 4KB of data. The maximum number of cookies allowed is 300.
Cookies are stored on client’s machine.

What is the difference between Cookies collection and Form/Query string collection?
Cookie collection does not have the Count property. Cookies can have multiple values for the same cookie name but each value can be referred using a key whereas in a Form/Query string cookie each value has to be referred using an index value.

What is Server Object?
Controls the ASP execution environment. It can set the amount of time script can run before an error occurs. Converts a virtual path to a physical path on the server. Takes a user supplied string and encode it into proper format for a URL string.

What is Collection?
Collection is a set of name/value pairs where the information supplied by the client is stored.

How will you delete a Cookie?
By setting its Expires property to any date prior to today Response.Cookies("cookie name"). Expires = Date 1.
What is the function of Buffer in Response Object?
Buffer controls the HTML output stream manually.

How are scripts executed?
ASP provides scripting engines that execute the corresponding scripting languages on the server side. Scripts should be encoded within the Delimiters.

What is ASP (Active Server Pages)?
ASP is a server side-scripting environment for building dynamic and interactive web pages. Since the scripts run on the server side, the web server does all the processing.

What are ARRAYS?
Arrays are variables that store items of similar information.DIM ARRAY1(4) (declares an array with the name array1 with 5 elements)


What is Application-scope?
Application-scope means that variables (and objects) can be accessed from any ASP pages that is part of the application.

What is Extranet?
An area of a web site available only to a set of registered visitors.

< SCRIPT LANGUAGE="VBScript" RUNAT=Server >
a = 1
< /SCRIPT >
< SCRIPT LANGUAGE="VBScript" >
a = 2
< /SCRIPT >
< %
Response.Write a
% <
In the sample code shown above, what will be written to the screen?

A. 1
B. 2
C. 1, 2
D. 1&2
E. Nothing. (Answer)

< % iPos = Instr("Hello World","r") % <
Referring to the above, what is the value of iPos?

A. 0
B. 1
C. 2
D. 8
E. 9 (Answer)

What are the types of HTML?
Static HTML Browser uses HTTP to request HTML file from the Web Server
Dynamic HTML Browser uses HTTP to request an executable application rather than a Static HTML file

What are the properties of Session Object?
SessionID returns the session identification number for each user.
Timeout sets the timeout period assigned to the Session object for any application, in minutes.
CodePage determines the code page that will be used to display content.
LCID a locale identifier, which determines time zone and language, rules for the system


What are the event handlers of Session Object?
Session _OnStart This event will be fired when a new user begins a session with the web site.
Session_OnEnd This event is called whenever a session terminates.

Name the ASP Objects?
Request Object
Response Object
Server Object
Session Object
Application Object