[thelist] Can I do this in ASP?
Scott Dexter
sgd at ti3.com
Tue Apr 9 11:59:17 CDT 2002
>
> You cannot do a Response.Redirect if you've written anything
> to the browser. The reason for this is that the
unless you do
<% response.buffer=true %>
at the top of the page =)
(the directive tells IIS to process the whole page before sending
anything to the client. So you can do your redirect half-way down. But I
don't like to do that from an organizational standpoint, it's like using
a GOTO in the middle of a subroutine)
oh, and using a form variable (Request.QueryString("mode")) to detect
whether the form is submitted or not leaves it open for forging; I use:
<% if (Request.ServerVariables("REQUEST_METHOD")="POST") then ... %>
(provided you're using the POST method in your forms)
just some thoughts...
sgd (Rudy in training)
More information about the thelist
mailing list