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)
 
Joined
Oct 15, 2008
Messages
3
Reaction score
0
I am on a page qith a queery string address of
http : // scm-web/ newintranet/ signcert/ CertDetail.aspx? SONum=810354&SOItem=3& DieNum=RD0018%20%20%20%20%20%20&AT=6061T6511%20%20& Desc=ROD%202.500%20+/-.007& CertDesc=ASTM-B221-06%20 Stencil&Spec1=400& Spec1Desc=400%20%20%20%20%20& Spec2=& Spec2Desc=& Spec3=& Spec3Desc=& CustName=YARDE%20METALS%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20& TruckID=091902
yet when I click my "Approve" button, it should redirect to http: //scm-web /newintranet /signcert /Default.aspx? TruckID=091902

but it does not.

Instead it keeps the first url with all of the query string values
However it does enter the code for the page Default.aspx, and enters the page load and checks to see if postback and it executes my method

I am using VB.NET
 
Last edited:

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

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top