1. What is ASP?

Answer:ASP stands for Active Server Pages. It is a server side technology which is used to display dynamic content on web pages. For example you could write code that would give your visitors different information, different images or even a totally different page depending on what browser version they are using.

2. How can you disable the browser to view the code?

Answer:Writing codes within the Tag

3. What is a “Virtual Directory”?

Answer:Virtual directories are aliases for directory paths on the server. It allows moving files on the disk between different folders, drives or even servers without changing the structure of web pages. It avoids typing an extremely long URL each time to access an ASP page.

4. Give the comment Tags for the following?

Answer:VBScript : REM & ‘(apostrophe)

JavaScript : // (single line comment)

/**/ (Multi-line comments)

5. Which is the default Scripting Language of ASP (server-side)?

Answer: [_private/tble_firefox.htm] VBScript

6. Which is the default Data types in VBScript?

Answer:Variant is the default data type in VBScript, which can store a value of any type.

7. What is a variable?

Answer:Variable is a memory location through which the actual values are stored/retrieved. Its value can be changed.

8. What is the maximum size of an array?

Answer:Up to 60 dimensions.

9. What is Query string collection?

Answer:This collection stores any values that are provided in the URL. This can be generated by three methods:

By clicking on an anchor tag

By sending a form to the server by the GET method

Through user-typed HTTP address

It allows you to extract data sent to the server using a GET request.

10. What are the attributes of the tags? What are their functions?

Answer:The two attributes are ACTION and METHOD The ACTION gives the name of the ASP file that should be opened next by which this file can access the information given in the form The METHOD determines which of the two ways (POST or GET) the browser can send the information to the server

11. What are the methods in Session Object?

Answer:The Session Object has only one method, which is Abandon. It destroys all the objects stored in a Session Object and releases the server resources they occupied.

12. What is ServerVariables collection?

Answer:The ServerVariables collection holds the entire HTTP headers and also additional items of information about the server.

13. What is the difference between Querystring collection and Form collection?

Answer:The main difference is that the Querystring collection gets appended to a URL.

14. What is a Form collection?

Answer:The Form collection holds the values of the form elements submitted with the POST method. This is the only way to generate a Form collection.

15. What are the ASP Scripting Objects?

Answer:The Dictionary object, the FileSystemObject object, TextStream object.

16. What happens to a HTML page?

Answer:The browser makes a HTTP request; the server gives a HTTP response to the browser and the browser converts into a HTML page.

17. What happens to ASP pages?

Answer:The browser makes a HTTP request; the server does the processing and gives a HTML response to the browser.

18. How can you change the primary scripting language for a page?


19. What is application Object?

Answer: Shares information among users of an application. Gives a notification when an application starts or ends.

20. What is the difference between client-side script and server-side script?

Answer:Scripts executed only by the browser without contacting the server is called client-side script. It is browser dependent. The scripting code is visible to the user and hence not secure. Scripts executed by the web server and processed by the server is called server-side script.

21. What is the command to display characters to the HTML page?


22. Explain the POST & GET Method or Explain the difference between them?


The POST method generates a FORM collection, which is sent as a HTTP request body. All the values typed in the form will be stored in the FORM collection.


The GET method sends information by appending it to the URL (with a question mark) and stored as A Querystring collection. The Querystring collection is passed to the server as name/value pair.

The length of the URL should be less than 255 characters.

23. How many global.asa files can an Application have?

Answer:[_private/tbl_gglapck.htm] Only one global.asa file and it’s placed in the virtual directory’s root.

24. How many global.asa files can an Application have?

Answer:Only one global.asa file and it’s placed in the virtual directory’s root.

25. What are Scripting Objects?

Answer:Objects that can enhance the application are known as the Scripting Objects.

26. What is the Order of precedence for LOGICAL Operators ?


27. What is an Err Object?

Answer:Name it’s properties and methods.

28. What are LOCAL and GLOBAL variables?

Answer:Local variables lifetime ends when the Procedure ends. Global variables lifetime begins at the start of the script and ends at the end of the script and it can be used by any procedure within the script. Declaring a variable by using the keyword PRIVATE makes the variable global within the script, but if declared using PUBLIC, then all scripts can refer the variable.

29. Which is the default Scripting Language on the client side?


30. What is HTML (Hypertext Markup Language)?

Answer:It’s a method by which web pages can be built and generally used for formatting and linking text.

31. What is a Web Server?

Answer:It’s a Computer that provides Web services on the Internet or on a local Intranet. It is designed to locate, address and send out simple HTML pages to all other users who access these pages.

32. What is Session Object?

Answer:It stores information about a User’s session. Gives a notification when a user session begins or ends.

33. What is Server-Side includes?

Answer:It provides extra information by which it makes the site easier to manage. It can include text files using the #include statement, retrieve the size and last modification date of a file, defines how variables and error messages are displayed and inserts the values of HTTP variables in the page sent back to the browser.

34. What is a FileSystemObject object?

Answer: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.

35. What is a Scripting Language?

Answer:It permits to create more interactive Web Pages. Validation, formatting of web pages can be done. VBScript, JavaScript are some examples.

36. What is a Dictionary object?

Answer: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.

37. What is Global.asa file?

Answer:It is text file that contains details about an ASP application, such as when it should begin and end.

38. What is an .ASP file?

Answer:It is a Text File that contains the combination of the following:


HTML tags

Script Commands

39. What is Response Object?

Answer: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

40. Naming constraints for a variable ?

Answer:It can be up to 255 characters Must start with an alphabet Must not contain an embedded period or full-stop

41. What is a TextStream object?

Answer:It allows you to access(read/write) the contents of text files stored on the web server.

42. What is IIS?

Answer: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.

43. What is Request Object?

Answer: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

44. What are the special sub-types in VBScript?

Answer:EMPTY: has no value NULL: Value does not exist (conjunction with database)OBJECT:

45. What is Cookies collection?

Answer: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.

46. What is the difference between Cookies collection and Form/Query string collection?

Answer: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.

47. What is Server Object?

Answer: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.

48. What is Collection?

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

49. How will you delete a Cookie?

Answer:By setting its Expires property to any date prior to today Response.Cookies(“cookie name”). Expires = Date 1.

50. What is the function of Buffer in Response Object?


Answer:uffer controls the HTML output stream manually.

51. How are scripts executed?

Answer:ASP provides scripting engines that execute the corresponding scripting languages on the server side. Scripts should be encoded within the Delimiters.

52. What is ASP (Active Server Pages)?

Answer: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.

53. What are ARRAYS?

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

54. What is Application-scope?

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

55. What is Extranet?

Answer:An area of a web site available only to a set of registered visitors.


a = 1



a = 2


< %

Response.Write a

% <

56. In the sample code shown above, what will be written to the screen?

Answer: A. 1

B. 2

C. 1, 2

D. 1&2

E. Nothing. (Answer)

< % iPos = Instr(“Hello World”,”r”) % <

57. Referring to the above, what is the value of iPos?

Answer:A. 0

B. 1

C. 2

D. 8

E. 9 (Answer)

58. What are the types of HTML?

Answer: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

59. What are the properties of Session Object?

Answer: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

60. What are the event handlers of Session Object?

Answer: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.

61. Name the ASP Objects?

Answer:Request Object

Response Object

Server Object

Session Object

Application Object

62. What are the advantages of using ASP?

Answer:Minimizes network traffic by limiting the need for the browser and server to talk to each other

Makes for quicker loading time since HTML pages are only downloaded

Allows to run programs in languages that are not supported by the browser

Can provide the client with data that does not reside on the client’s machine

Provides improved security measures since the script cannot be viewed by the browser

63. What are the methods in Application Object?

Answer:Lock prevents clients from modifying the variables stored in the Application object. Unlock removes the lock from variables stored in the Application object.

64. What are the methods in Application Object?

Answer:Internet Information Server (IIS) on Windows NT

Personal Web Server (PWS) on Windows 95

Peer Web Services on Windows NT

65. What are the browsers that can access ASP pages?

Answer:Internet Explorer (supports VBScript, JavaScript) Netscape Communicator/ Navigator (supports only JavaScript, VBScript can be also added too)

67. How does the server identify and execute the server-side scripts within HTML code?

Answer:Including the RUNAT=SERVER attribute

68. What are the methods by which output stream is controlled?

Answer:Flush sends previous buffered output to the client immediately, but continues processing the script. Clear erases any already-buffered HTML.

End causes the server to stop processing the script.

69. What are the properties used to control the expiration of the page?

Answer:Expires specifies the number of minutes before a page cached on a browser expires.

ExpiresAbsolute sets the date and time at which a page cached on a browser expires.

70. What are the collections of Session Object?

Answer:Contents collection contains all the variables established for a session without using the tag. Static collection contains all the objects created

71. What is the difference between ASP and HTML? Or Why ASP is better than HTML?

Answer:– ASP executes code on the server side whereas the browser interprets HTML.

– ASP can use any scripting languages

– Gets feedback from the user and return information to the user

– Create pages that will be customized to display only things that will be of interest to a particular user

– Can edit contents of a web page by updating a text file or a database rather than the HTML code itself

72. What are the event handlers of Application Object?

Answer:Application_OnStart- This event will be fired when the first visitor hits the page. Application_OnEnd- This event runs when the server is stopped.

73. Name some of the ASP components?

Answer:Ad Rotator component- a way to manage advertisements on the web site.

Content Linker component – a technique to direct users through a set of pages on a web site by creating a list of URLs and description of the next and previous pages.

Browser Capabilities component – allows to customize the page to the ability of the browser viewing it.

Database Access component – allows to access data from the database

78. What are the tasks performed by < FORM > tags?

Answer:tags provides space for the user to input values

the form has a button to submit information back to the server

It transfers control to another ASP page

It carries the information in the fields to another ASP page

79. What are the tags necessary to be present within thetag?

Answer:—–tag: Provides input spaces (text boxes, combo boxes, radio button, etc.) on a form called fields. It has three attributes TYPE, NAME and VALUE. TYPE provides the characteristics of the field and the NAME specifies a name to the field by which it can be referred.

80. What are the collections of Application Object?


* Contents collection – contains all variables added via scripts in global.asa.

* Static collection – contains the names of all objects.

81. How do you create a recordset object in VBScript?

Answer 1: //First of all declare a variable to hold the Recordset object, ex- Dim objRs

//Now, Create this varible as a Recordset object, ex-

Set objRs=Server.CreateObject(ADODB.RECORDSET)

Answer 2: ” rs.MoveNext


end if


*. Create Recordset object

*. Place form field value in a variable named “param”

*. Define query by concatenating strings and variable value

*. Open RecordSet Object. Note that the first parameter is the Command Text. The second parameter is the Connection String. The Command Object and Connection Object are created implicitly.

*. Make sure the RecordSet isn’t empty

*. Begin executing a loop which goes through all records in the RecordSet.

*. Write each record’s “firstname” and “lastname” fields to the page on a separate line.

*. Move to Next Record.

83. Explain the difference between POST and GET Method.

Answer:GET requests are string data that is visible to the end user via the URL and a limit of 2kb, POST requests have no limit on total data and the user can’t see the data in a query string.

84. Why do we use Option Explicit?

Answer 1 : To avoid multiple variables of the same name.

Answer 2: Correct answer is – This statement force the declaration of variables in VB before using them.

85. How do you write an SQL insert statement?

Answer:insert into tablename (fieldA, fieldB, fieldC)Values(’dataA’, ‘dataB’, ‘dataC’);

86. How can you have different number of cells for each row of a table in HTML?

Answer:using colspan and rowspan

87. What variable can you use to share info across the whole application for one user?

Answer:Use the sessions object

88. What is string concatenation function in VBScript?

Answer:the ampersand symbol and ampersand space underscore across multiple lines

89. How do you get the value of a combo box in Javascript?

Answer 1: document.forms[’formName’].elements[’comboName’].options[i].value

Answer 2: document.form_name.element_name.value

90. What is a class in CSS?

Answer 1: A class allows you to define different style characteristics to the same HTML element.

Answer 2: class is a child to the id, id should be used only once, a css class can be used multiple times:

div id=”banner”

p class=”alert”

When inserting strings into a SQL table in ASP what is the risk and how can you prevent it?

Answer:SQL Injection, to prevent you probably need to use Stored Procedures instead of inline/incode SQL

91. Which is the default Data types in VBScript ?

Answer: Variant.