View Single Post
  #2 (permalink)  
Old July 21st, 2008, 09:12 AM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

When you use "Response.Redirect", ASP.NET issues a "Status 302: Page Moved" response to the browser. No HTML ever gets to the browser, so the browser only responds to the redirect. In order to do what you describe, you must use an alternate method of redirecting. If you want to show a javascript alert box, then you could similarly use javascript to "redirect" the user (document.location.href = '<new page here>';). Put that after the alert and the page will change after the user clicks OK on the alert. Otherwise, you can use a redirect meta tag for an explicit timed redirect.

-Peter
compiledthoughts.com