ASP Performance test report (Turn) (ii)

Source: Internet
Author: User
, ASP dynamically generated content in what way to output the highest efficiency?
Author: Cactus Studios This article hits: 123
Generating dynamic content on the server is one of the main reasons to use ASP, so the first test project we choose is to determine what method is best to send dynamic content to the response stream. There are two basic choices (and some of their changes): Using embedded ASP tags, using the Response.Write statement.
To test these different methods, we created a simple ASP page that first defines the variables and then inserts them into the table. Although this page is simple and has no practical purpose, it is enough to allow us to isolate and test each problem.
2.1 Using ASP Inline markup
The first test is to use the ASP's inline tag <%= x, where x is a variable. This is the easiest way to use it, and it makes the HTML part of the page easier to read and maintain.
<% OPTION EXPLICIT
Dim FirstName
Dim LastName
Dim middleinitial
Dim Address
Dim City
Dim State
Dim PhoneNumber
Dim Faxnumber
Dim EMail
Dim Birthdate
FirstName = "John"
MiddleInitial = "Q"
LastName = "Public"
Address = "Main Street"
City = "New York"
State = "NY"
PhoneNumber = "1-212-555-1234"
Faxnumber = "1-212-555-1234"
EMail = "John@public.com"
Birthdate = "1/1/1950"
% >
< HTML >
< head >
< title >response test</title >
< BODY >
< H1 >response test

< TABLE >
< TR >< TD >< B >first name:</></td >< TD ><%= FirstName% ></td &GT;&L T /tr >
< TR >< TD >< B >middle initial:</></td >< TD ><%= middleinitial% ></t D ></tr >
< TR >< TD >< B >last name:</></td >< TD ><%= LastName% ></td >< /tr >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.