ASP Design FAQ and Solution Essentials-4

Source: Internet
Author: User
Tags html form new features requires what is asp
23. Question: Are there several ways to read HTML form fields in an ASP file?

A: The Request object can read the contents of an HTML form field in addition to the parameters that are attached to the URL behind it, and the syntax structure that is often used is as follows:

< Form name =formname method= "get| Post "action=" URL >< Form >
The method can accept methods of getting or post two transmissions, where the post is a method that allows large amounts of data to be transmitted, and the Get method will attach the data to be transferred behind the URL and then serve the server together, thus limiting the amount of data transferred. But the execution efficiency is better than the Post method.

You can use the Get or POST method to send data to the server, and the corresponding method for receiving data using the Request object is as follows:

Get:Request.QueryString ("field name") can also be written as Request ("Field name")
Post:Request.Form ("field name") can also be written as Request ("Field name")

24, question: How to improve the efficiency of using the request collection?

A: When using the Request collection, it is much slower than accessing a local variable because it contains a series of searches for the related collection. Therefore, if you intend to use a value in the request collection more than once in a page, you should consider storing it as a local variable.

25. Question: Can you use VBScript in ASP pages, or use JScript to mix script engines?

A: Although you can use VBScript in ASP pages, you can also use JScript. However, it is not advisable to use both JScript and VBScript on the same page. Because the server must instantiate and attempt to cache two (rather than one) scripting engines, this increases the system burden to some extent. Therefore, for performance reasons, you should not mix multiple scripting engines on the same page.

26. Question: When we set up an ASP file, and the syntax, enter the following address through the browser, or open browsing through the Explorer: c:\inetpub\wwwroot\ A.asp, you will be unable to run the error, and prompted the right or the file is inaccessible, why not run the ASP file properly?

A: This is because the ASP file first requires the site to have the "execute (script)" attribute, and then requires the URL format to enter the address, rather than the DOS format, we need to install and start the Web service platform on the computer, and ensure that the ASP files are stored in the Web server virtual directory, You can browse through HTTP format, enter in the address bar of the browser: "http://Web site name (or site's IP address)/asp file name", after carriage return can see the server executes ASP file result in the browser.

27. Question: What is asp.net? What does it have to do with ASP?

A: Active Server Pages (ASP, Active Server Page) is a relatively simple programming environment in which you can mix HTML, scripting languages, and a small number of components to create server-side Internet applications;

Asp. NET is a powerful programming environment that Microsoft can use to create web-based applications using a variety of high-level languages such as C # and scripting languages, HTML, XML, XSL, and so on. Asp. NET C # as an object-oriented language, in many ways, C # will become Microsoft's Java-like language. C # is one of the most important features of ASP.net development, and Microsoft will develop C # as a strong competitor to Java. This is also Microsoft. An important part of the NET Framework. I think C # is the main tool for Microsoft to beat its opponents in the programming language field.

Asp. NET in object-oriented, database connection, large site applications are better than the ASP program, ASP. NET also offers new features such as built-in object caching and page-result caching, built-in XML support, simple processing of XML datasets, and more fully interactive server control.

Asp. NET is still completely locked in Microsoft's operating system, to really play asp.net potential, you have to use C # or vb.net. Both languages will become the core scripting language of the ASP.net standard.



Related Article

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.