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