*Experts* Bucky Posted November 23, 2002 *Experts* Posted November 23, 2002 If I use Response.Redirect in the Load event of a Page (or in a method called from the Load event), is the page's HTML ever returned to the client browser? For example, if a user does not have permission to view a certain page, I want to redirect them to a page saying that action was a "no-no", without them being able to view the page they tried to in any way. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
*Gurus* Derek Stone Posted November 23, 2002 *Gurus* Posted November 23, 2002 Use Server.Transfer(). I don't believe the client will be sent anything other than headers using Response.Redirect() if ASP.NET buffering is enabled, but to be on the safe side use Server.Transfer(), which stops execution of the page altogether. I'll do some tests to see if data is sent when Response.Redirect() is used.[edit]The more that I think about it, Response.Redirect() should be sending a 304 response code. 304's redirect the browser to a different page. Say for instance if the page location has changed.[/edit] Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.