Learn ASP MCQs
Prepare ASP MCQs (Multiple choice Questions) for exam and job interviews.
Which of the following is not an ASP built-in object?
1) Session
2) Response
3) Request
4) URL
Answer : URL
How do you create a cookie in ASP?
1) Response.Cookies("cookieName") = "value"
2) Create.Cookie("cookieName", "value")
3) Set.Cookie("cookieName", "value")
4) Response.SetCookie("cookieName", "value")
Answer : Response.Cookies("cookieName") = "value"
What is the function of the Application object in ASP?
1) To store application-wide data
2) To manage user sessions
3) To handle file uploads
4) To send responses to the client
Answer : To store application-wide data
Which operator is used for concatenation in ASP?
1) &
2) +
3) |
4) *
Answer : &
What does the Request.QueryString collection contain?
1) Data sent in the URL
2) Data sent in the body of the request
3) User session data
4) Application variables
Answer : Data sent in the URL
How do you create a new session variable in ASP?
1) Session("variableName") = value
2) Set.Session("variableName") = value
3) Create.Session("variableName", value)
4) New.Session("variableName") = value
Answer : Session("variableName") = value
Which method is used to write to the HTTP response in ASP?
1) Response.Output
2) Response.Print
3) Response.Write
4) Response.Send
Answer : Response.Write
How do you comment code in ASP?
1) ' This is a comment
2) // This is a comment
3) <!-- This is a comment -->
4) # This is a comment
Answer : ' This is a comment
What is the purpose of the Server object in ASP?
1) To manage server-side functionality
2) To store session variables
3) To send requests to clients
4) To manage user authentication
Answer : To manage server-side functionality
What does the Dim statement do in ASP?
1) Declares a variable
2) Initializes a variable
3) Creates a function
4) Defines a procedure
Answer : Declares a variable