<html><body> <form method="post" action="http://www.w3schools.com/simpleform.asp"> Your name: <input type="text" name="fname" size="20" /> <input type="submit" value="Submit" /> </form> <% dim fname = Request.Form( "fname" ) If fname <> "" Then Response.Write( "Hello " & fname & "!" ) Response.Write( "How are you today?" ) End If %> </body></html> |
<%
and %>
.
Server scripts are executed on the server, and can contain any expressions, statements, procedures, or operators valid for the scripting language you prefer to use.
Note that ASP.NET is the successor to ASP technology, but it is not ASP compatible.You cannot view the ASP source code by selecting “View page source” in a browser, you will only see the output from the ASP file, which is plain HTML. This is because the scripts are executed on the server before the result is sent back to the browser.