Learn ASP MCQs
Prepare ASP MCQs (Multiple choice Questions) for exam and job interviews.
How can you convert a string to a double in ASP?
1) CDbl("string")
2) Convert.ToDouble("string")
3) Double("string")
4) CDouble("string")
Answer : CDbl("string")
What is the purpose of the Server.Execute method?
1) To execute another ASP file
2) To execute server-side scripts
3) To run database queries
4) To send data to the client
Answer : To execute another ASP file
Which event occurs when a user leaves an ASP page?
1) Session_OnEnd
2) Session_OnStart
3) Application_OnEnd
4) Application_OnStart
Answer : Session_OnEnd
How do you redirect a user to another page in ASP?
1) Response.Redirect("page.asp")
2) Redirect("page.asp")
3) Response.GoTo("page.asp")
4) MoveTo("page.asp")
Answer : Response.Redirect("page.asp")
Which data type is used to store true or false values in ASP?
1) Boolean
2) Integer
3) String
4) DateTime
Answer : Boolean
How do you create a constant in ASP?
1) Const variableName = value
2) Create Const variableName = value
3) Dim variableName = value
4) Let variableName = value
Answer : Const variableName = value
What does the Session.Count property return?
1) The number of session variables
2) The number of active sessions
3) The total user count
4) The number of application variables
Answer : The number of session variables
Which of the following is an ASP data type?
1) Variant
2) Object
3) DataSet
4) ArrayList
Answer : Variant
What method is used to retrieve form data in ASP?
1) Request.Form
2) Request.QueryString
3) Request.Data
4) Request.Input
Answer : Request.Form
How do you compare two strings in ASP?
1) StrComp("string1", "string2")
2) Compare("string1", "string2")
3) string1 = string2
4) Equals(string1, string2)
Answer : StrComp("string1", "string2")