
May 5th, 2003, 10:58 AM
|
 |
Web Developer
|
|
Join Date: Oct 2001
Location: Finland
Posts: 719
  
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 14
|
|
|
Multiple lines with one command
Hi all
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:
Code:
<%
Language = VBScript
Dim strEtunimi
Response.Expires = 0
If Request.ServerVariables("QUERY_STRING") <> "" Then
strEtunimi = Request.QueryString("etunimi")
response.write "Your name is <b>" & strEtunimi & "</b>"
%>
<% Else %>
<html>
<body>
Personal data:
<form name="formis" method="get" action="vastaus_v2.asp">
Etunimi: <input type="text" name="etunimi" value="">
<p>
<input type="submit" value="Lähetä">
<input type="reset" value="Tyhjennä">
</form>
</body>
</html>
<% 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.
|