Learn ASP MCQs
Prepare ASP MCQs (Multiple choice Questions) for exam and job interviews.
Which ASP object is used to manage application-level variables?
1) Application
2) Session
3) Request
4) Response
Answer : Application
How can you create an ASP file?
1) Any text editor
2) Microsoft Word
3) Notepad only
4) Visual Studio only
Answer : Any text editor
What is the default script language for ASP?
1) VBScript
2) JavaScript
3) PHP
4) Python
Answer : VBScript
Which function is used to replace a string in ASP?
1) Replace()
2) StringReplace()
3) Substitute()
4) ChangeString()
Answer : Replace()
How do you write a server-side script in ASP?
1) Using <% %>
2) Using //
3) Using <!-- -->
4) Using /* */
Answer : Using <% %>
What does the Server.Execute method do?
1) Executes another ASP page
2) Redirects to another page
3) Includes a file
4) Runs a script
Answer : Executes another ASP page
Which of the following is NOT a valid way to include a file in ASP?
1) <!--#include file="filename.asp" -->
2) <script src="filename.asp"></script>
3) <!--#include virtual="filename.asp" -->
4) None of the above
Answer : <script src="filename.asp"></script>
What does the Session.SessionID property represent?
1) Unique identifier for a session
2) ID of the current request
3) ID of the user
4) ID of the application
Answer : Unique identifier for a session
What is the purpose of the Request.QueryString collection?
1) To retrieve query string values
2) To send data to the client
3) To handle cookies
4) To manage sessions
Answer : To retrieve query string values
How can you loop through all cookies in ASP?
1) For Each cookie in Request.Cookies
2) For cookie in Cookies
3) For cookie in Request
4) For Each cookie in Cookies
Answer : For Each cookie in Request.Cookies