Learn ASP MCQs
Prepare ASP MCQs (Multiple choice Questions) for exam and job interviews.
What is the main purpose of ASP?
1) To create dynamic web pages
2) To create static web pages
3) To manage databases
4) To handle user authentication
Answer : To create dynamic web pages
Which of the following is an ASP scripting language?
1) HTML
2) VBScript
3) JavaScript
4) CSS
Answer : VBScript
How do you declare a variable in ASP?
1) Dim variableName
2) var variableName
3) let variableName
4) declare variableName
Answer : Dim variableName
Which method is used to send data to the client in ASP?
1) Response.Write
2) Response.Send
3) Response.Output
4) Response.Display
Answer : Response.Write
What does the Session object store?
1) User-specific data
2) Application settings
3) Global variables
4) Database connections
Answer : User-specific data
What is the default file extension for an ASP file?
1) .html
2) .asp
3) .aspx
4) .php
Answer : .asp
How can you include a file in an ASP page?
1) <!--#include file="filename.asp" -->
2) <script src="filename.asp"></script>
3) <import file="filename.asp">
4) <require file="filename.asp">
Answer : <!--#include file="filename.asp" -->
Which object is used to manage user sessions in ASP?
1) Session
2) User
3) Request
4) Response
Answer : Session
How do you retrieve a value from a form field in ASP?
1) Request.Form("fieldname")
2) Request.Field("fieldname")
3) Form("fieldname")
4) Get("fieldname")
Answer : Request.Form("fieldname")
What is the purpose of the Response.Redirect method?
1) To redirect the client to another URL
2) To end the current session
3) To output text to the client
4) To refresh the page
Answer : To redirect the client to another URL