The difference between asp+ and ASP (6)

Source: Internet
Author: User
Tags end unique id
asp+| distinguish server-side asp+ code
Author: Green Apple Computer Studio This article hits: 2733


To display values on the page, we use the same code as in the previous ASP example:

...
If Len (Request.Form ("Selopsys")) 〉0 Then
Stropsys = Request.Form ("Selopsys")
StrName = Request.Form ("Txtname")
Response.Write ("You selected '" & Stropsys _
& "' For Machine '" & StrName & "'.")
End If
...

But a big feature of asp+ and server control is that code running on the server and generating page output can
Use them. The asp+ interpreter emphasizes having a unique id attribute so that all server controls (for example, those with
The elements of the runat= "server" attribute can be reused by code. This means that we are no longer using the request collection
To get those values from our form to control the mail back to the server. Instead, they can be referenced directly by using their unique IDs:

...
If Len (selopsys.value) 〉0 Then
Response.Write ("You selected '" & Selopsys.value _
& "' For Machine '" & Txtname.value & "'.")
End If



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.