ASP Interview Questions and Answers

81. How to Display images using Response object?
A. Contenttype=Application/Brush
B. Contenttype=Image/JPG (Answer)
C. Contenttype=Application/paint
D. Contenttype=Image/WMF
82. 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 and started. 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. (Answer)
83. Following is the code Server.MapPath (".") consider the path is C:InetpubWWWRootMATDefault.asp. What will be the output
A. C:InetPUb
B. C:InetPUbWWWroot
C. C:InetPUbwwwrootMAT
D. Error
84. ‘onStart’ and ’onEnd’ are events of what object(s)?
A. Application only.
B. Session only.
C. Server only.
D. Application and Session only.
E. Application, Session, and Server.
85. The FileSystemObject provides an object interface to drives, directories, and files for which of the following?
A. Any local or mapped drive on either the server or the client. (Answer)
B. Only files and subdirectories in the web site’s home directory.
C. Any local physical drive or mapped drive on the web server.
D. Any file system physically located on the web server.
E. The client’s computer.
86. When does the application OnEnd event handler fire?
A. After every request for an application document, since web servers are stateless servers.
B. As soon as there are no open connections to any application document.
C. When the web server is stopped in an orderly fashion. (Answer)
D. Twenty minutes after the last request for a document in the application.
E. When there are no application requests for the amount of time defined by the SessionTimeout variable.
87. What is the program ID (ProgID) for ActiveX Data Objects in 2-tier and 3-tier database applications?
A. ADO
B. RDODB
C. ADODB (Answer)
D. RDS
E. OLEDB
88. What should the developer use in order to have an Active Server Page (ASP) invokes a stored procedure on a SQL Server database?
A. ADO
B. RDO
C. RDS
D. OLEDB
E. None of the above.
88. How Many Types of Cookies?
A. 3
B. 2
C. 1
D. 4
89. What is the Default ScriptTimeOut for Server Object?
A. 20 Sec
B. 30 Sec
C. 60 Sec
D. 90 Sec
90. How many Max Cookies can we create in Server?
A. 10
B. 20
C. 30
D. 40
91. < 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)
92. < % 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)
93. Which-code sample will report whether the client’s browser supports cookies?
A. B. You can only use JavaScript for this.
C. D. (Answer)
E.
94. What is a session?
A user accessing an application is known as a session.
95. What is ClientCertificate collection?
A ClientCertificate is an encrypted number that is stored in a file on the user’s computer. This stores details of any security certificates included with the request.
96. What do you need to run ASP?
A browser and a Web server
97. What do you need to run ASP?
1) It informs each page what session the request belongs to when a user accesses during a session.
2) It retrieves all the session information stored on the server.
3) Cookies can persist for a much longer period of time than session that has a timeout value usually of 20 minutes and hence can store information even when a user is off the site.
98. What is the order of execution for an ASP application?
1) Global.asa
2) Server-side Includes
3) Jscript scripts tagged within
99. 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
100. 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