Response.redirect does not redirect from .aspx page

G

Guest

I am calling Response.redirect(strURL, false) from the page_load event in an
..aspx.

My goal is simply to display an https://somewhere.com/ in the current page.

On execution I get the .aspx page without any redirect. The url displays my
..aspx path. Any help is greatly appreciated.

Thanks
 
S

Scott Mitchell [MVP]

Troy said:
I am calling Response.redirect(strURL, false) from the page_load event in an
.aspx.

On execution I get the .aspx page without any redirect. The url displays my
.aspx path. Any help is greatly appreciated.

Are you sure that your Response.Redirect() call is getting executed? If
you set a breakpoint there and run the page through the debugger, are
you seeing that line being hit?

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 
B

bruce barker

if you call Response.Redirect(strURL, false) , it just adds the redirect
header to the response. if you later clear headers it will not work.


-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top