ASP Interview Questions
a = 1 </SCRIPT> a = 2 </SCRIPT> <% Response.Write a %>
In the sample code shown above, what will be written to the
C. 1, 2
<% Set Application("Thing") = Server.CreateObject("THINGDOER.thingy") %>
The above code appears in the global.asa file. What would it
A. It would create a “Thing” object and place it in Contents Collection of
the Application object.
B. It would create a “Thing” object and place it in StaticObjects
Collection of the Application object.
C. It would create a “Thing” object and place it in the Application.Buffer
Collection Of the Application object.
D. It would create an application-level variable named “Thing” with the
value of the object property “THINGDOER.thingy”.
E. It would fail to create a “Thing” object because the code requires the
Application.Lock and Application.Unlock methods.
<% iPos = Instr("Hello World","r") %>
Referring to the above, what is the value of iPos?
<% varType = rsTest("field1").type %>
In the database table, if the datatype for field1 (shown
above) is Number, what is the value of varType?
A. The field value.
B. A string description.
C. The field name.
E. An enumerator.
5. What is the program ID (ProgID) for ActiveX Data Objects in 2-tier and 3-tier database applications?
6. Which choice is NOT an ADO collection?
7. Which will NOT set the scope of an Active Server Component?
A. Setting the [component name].scope property.
B. Using the Server.CreateObject method.
C. Placing it in the Session or Application OnStart event handler.
D. Instantiating the component in the global.asa file.
E. Using the
8. How to handle Error in ASP
A. Using On Error Goto
B. Using On Error Resume
C. Using On Error Resume Next
D. Using On Error Goto 0
<% intA = 3 sStrA = "Hello World" sStrB = "Hello World" + intA Response.Write sStrB %>
What would be the result of the above code?
A. Type mismatch error
B. “Hello World, Hello World, Hello World”
D. “Hello World 3”
E. “Hello World”
10. What happens when a client submits a form which changes the
value of an Application variable?
A. Client actions cannot change Application variables.
B. The change is not visible to any client until the application is stopped
C. The change is only visible to future requests made by that
client during their current session.
D. The change is visible to all clients, but only after they
complete their current sessions and begin a new session.
E. The change is visible to all clients immediately after the
form is processed by the server.
11. ADO is an object model for accessing which of the
A. Relational data via Jet.
B. Local or SQL data via Jet.
C. Relational data via ODBC.
D. Non-relational data via DSN-less ODBC.
E. All types of data via OLE DB.
12. Which of the following are Server Object methods ( Choose Two)
13. Following is the code Server.MapPath (“.”) consider the path is C:\Inetpub\WWWRoot\MAT\Default.asp. What will be the output
14. ClientCertificate is a collection of