ASP design FAQs and Answers 4
23. Problem: How many ways to read the HTML's form field in the ASP file?
A: The Request object can read the contents of the HTML form field in addition to the parameters of the URL, and the syntax structure that is often used is as follows:
Where the method can accept the two ways of GET or POST, where POST is a method that allows for a large amount of data, and the GET method will attach the data to be transmitted behind the URL, and then serve the server together, so the amount of data transmitted It will be limited, but the performance efficiency is better than the POST method.
Data can be sent to the server using the GET or POST method, and the corresponding method of receiving data using the request object is as follows:
GET: Request.QueryString ("Field Name"), you can also write a Request ("Field Name")
Post: Request.form ("Field Name"), you can also write a request ("field name")
24. Problem: How to improve the efficiency of using the Request collection?
A: When using the Request collection, this is much more slower than accessing a local variable because of a series of searches for related collections. Therefore, if you intend to use a value in the Request collection multiple times in the page, you should consider storing it into a partial variable.
25. Problem: You can also use VBScript in the ASP page, you can also use JScript, how is a mixed use script engine?
A: Although VBScript can be used in the ASP page, JScript can also be used. But use JScript and VBScript simultaneously on the same page, it is not desirable. Because the server must instantiate and try cache two (rather than one) script engine, this increases the system burden to some extent. Therefore, from performance consideration, multiple script engines should not be mixed in the same page.
26, question: When we set an ASP file, and in compliance with the grammar, enter the following address by the browser, or open the browse through the Explorer: c: /inetpub/wwrow/a.asp, there will be unable to run errors, And prompt the permissions that the file cannot be accessed, why not run the ASP file normally?
A: This is because the ASP file first requires the site to be "executed (script)" attribute; then enter the address according to the URL format, not the DOS format, we need to install it on the computer and start the web service platform, and ensure ASP Files are stored in the virtual directory of the web server, you can browse through the HTTP format, entered in the address bar of the browser: "http: // Web site name (or site IP address) / ASP file name", Enter The result of the server execute the ASP file will be seen in the browser.
27, problem: What is ASP.NET? What is the relationship with ASP?
A: Active Server Pages (ASP, Active Server Page) is a relatively simple programming environment, in which HTML, scripting languages, and a small component can be mixed to create a server-side Internet application; ASP.NET is the powerful function of Microsoft The programming environment, you can create a network-based application using a variety of advanced languages and scripting languages such as C #, HTML, XML, XSL, etc. ASP.NET uses C # as an object-oriented language, in many ways, C # will be Microsoft's similar language similar to Java. C # is a most important feature in ASP.NET development, Microsoft will develop C # to become a strong opponent in Java. This is also an important part of the Microsoft .NET framework. I think C # is Microsoft to defeat the opponent in the programming language.
ASP.NET is better than ASP programs in terms of object-oriented, database connections, large sites applications, and ASP.NET also provides more new features, such as: built-in object cache and page results cache; built-in XML Support, can be used for simple processing of XML data sets; server control provides more fully interactive system.
ASP.NET
Still completely locked in Microsoft's operating system, trying to play
Potential, you have to use
C #
or
VB.NET
. These two languages will become
Standard core scripting language.