shank wrote on 12 okt 2003 in microsoft.public.inetserver.asp.general:
Is there anything technically wrong with the way I have the below code
arranged? It works, but is not how I am used to seeing page headings
layed out.
thanks!
<%@LANGUAGE="VBSCRIPT"%>
<% response.buffer = true %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!--#include file="Connections/dbconnect.asp" -->
<%
sname = UCASE(Request.ServerVariables("SERVER_NAME"))
If InStr(sname,"NEWRELEASES") <> 0 then
response.redirect "http://www.mydomain.com/newproduct/"
ElseIf InStr(sname,"SPECIALS") <> 0 then
response.redirect "http://www.mydomain.com/specials/"
End If
%>
<html>
blah blah blah....
I would do the redirects first,
anyway before any output to clientside,
wich the DOCTYPE declaration is.
[In your version are only saved by the buffering.]
If you are only writing for your own machine [set on vbs],
I could do without the langage declaration.
===================================
<%@LANGUAGE="VBSCRIPT"%>
<%
sname = UCASE(Request.ServerVariables("SERVER_NAME"))
If InStr(sname,"NEWRELEASES") <> 0 then
response.redirect "http://www.mydomain.com/newproduct/"
ElseIf InStr(sname,"SPECIALS") <> 0 then
response.redirect "http://www.mydomain.com/specials/"
End If
%>
<% response.buffer = true %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!--#include file="Connections/dbconnect.asp" -->
<html>
blah blah blah....
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)