May 5th, 2003, 10:58 AM
Join Date: Oct 2001
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 14
Multiple lines with one command
I gotta ask this, since I'm in a dispute with my ASP teacher. We are writing small ASP scripts, you know trying to learn it but the way we write ASP is pretty complicated for me. Here is a simple example of our scritps:
Language = VBScript
Response.Expires = 0
If Request.ServerVariables("QUERY_STRING") <> "" Then
strEtunimi = Request.QueryString("etunimi")
response.write "Your name is <b>" & strEtunimi & "</b>"
<% Else %>
<form name="formis" method="get" action="vastaus_v2.asp">
Etunimi: <input type="text" name="etunimi" value="">
<input type="submit" value="Lähetä">
<input type="reset" value="Tyhjennä">
<% End If %>
What bothers me is the multiple opening and closing ASP tags on the document. With PHP I've got used to the idea that I can put everything inside one set of PHP tags. In this example both the Else and the End If are enclosed in their own ASP tags and that freaks me out (I like details). I can only imagine how this looks if we would be writing a much more complex and bigger application.
What I'd like is to enclose all of this inside one set of ASP tags and have Response.Write print all the necessery HTML code. Is this possible?
-- Tomi Kaistila
-- Developer's Journal
The more you learn, the more you know.
The more you know, the more you forget.
The more you forget, the less you know.