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:
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.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 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?