ASP Quiz 2

Description: ASP(Active Server Pages) Quiz 2
Number of Questions: 15
Created by:
Tags: asp
Attempted 0/15 Correct 0 Score 0

ASP is which?

asp
  1. Client-side executable code (executes at the browser level)

  2. Server side executable code (runs at the server only)


Correct Option: B

Client-side scripting code and server-side scripting code can coexist and can be used on the same page.

asp
  1. True

  2. False


Correct Option: A

AI Explanation

To answer this question, you need to understand the concepts of client-side scripting and server-side scripting.

Client-side scripting refers to the code that is executed on the client's web browser. This code is typically written in languages such as JavaScript and is used to enhance the user experience by adding interactivity and dynamic content to web pages.

Server-side scripting, on the other hand, refers to the code that is executed on the web server. This code is typically written in languages such as PHP, Python, or Ruby and is used to process data, interact with databases, and generate dynamic web pages.

Now, coming to the question, it is true that client-side scripting code and server-side scripting code can coexist and be used on the same page. This is because client-side scripting code runs on the client's browser, while server-side scripting code runs on the server. They serve different purposes and can work together to create a complete web application.

For example, you can use client-side scripting code written in JavaScript to validate user input on a form before it is submitted to the server. Once the form is submitted, the server-side scripting code can process the data, perform any necessary calculations or database operations, and generate a response that is then sent back to the client.

Therefore, the correct answer is A) True.

Variable are used to hold both numerical and text values. Which of these IS NOT a valid variable name?

asp
  1. X

  2. X1

  3. 1X

  4. x1X


Correct Option: C

Which of these is OKAY to use for a variable name?

asp
  1. employee salary

  2. 2nd_employee

  3. employee_hire_date

  4. date-of-birth

  5. date_of.birth


Correct Option: C

ASP code is....

asp
  1. a client-side executable code.

  2. a server-side executable code.

  3. a world-wide-web executable code.

  4. all of the above.


Correct Option: B

Which programming language is most commonly used to script ASP code?

asp
  1. ASP

  2. JavaScript

  3. VBScript

  4. C++

  5. Perl


Correct Option: C
asp
  1. True

  2. False


Correct Option: A
Explanation:

To solve this question, the user needs to have knowledge of ASP (Active Server Pages) and HTML.

ASP pages are a type of web page that allows for server-side scripting. They can contain embedded code written in a scripting language such as VBScript or JScript. This code is processed by the server before the resulting HTML is sent to the client's web browser.

HTML (Hypertext Markup Language) is the standard markup language for creating web pages. It is used to structure and present content on the web.

Now, let's go through each option and explain why it is right or wrong:

A. True: This option is correct. ASP pages can indeed contain embedded HTML code. HTML is used to define the structure and content of the page, while ASP code can be embedded within the HTML to perform server-side processing and generate dynamic content.

B. False: This option is incorrect. ASP pages can contain embedded HTML code, so the statement is true.

Therefore, the answer is: A. True

What happens when a user types in a URL that requests an ASP page?

asp
  1. Browser requests ASP code, server returns code, browser executes code into HTML form

  2. Browser requests ASP code, server executes ASP code and returns HTML document to browser

  3. Browser requests code, server returns code, Windows executes code since ASP is Microsoft code.


Correct Option: B

If the default pages in HTML are index.htm, default.html, etc, what are the default pages in ASP?

asp
  1. index.asp

  2. default.asp

  3. home.asp

  4. Both A and B

  5. Both B and C


Correct Option: D

When writing ASP code, what are the correct delimiters to use?

asp
  1. < code >


Correct Option: D

It is imperative when writing ASP code is to begin every file with which statement?

asp

Correct Option: C

In order for you to execute ASP code on your computer, you need to be running web server software such as Personal Web Server.

asp
  1. True

  2. False


Correct Option: A

ASP code can be written in any text editor such as Notepad.

asp
  1. True

  2. False


Correct Option: A

Thinking Question: ASP code can be written to show the current time. Is it possible to show a live, ticking clock using ASP?

asp
  1. Yes, ASP will pull the time from the web server and feed it to the client browser.

  2. No, once the ASP script has finished executing, it cannot do any more after the page reaches the client browser.


Correct Option: B
- Hide questions