Client-side debugger on wrong page after Response.Redirect

M

Martin

In server-side code of Page1.aspx, in the click eventhandler for an
imagebutton, I branch to another page:

Response.Redirect("Page2.aspx")


But the client-side javascript on Page2.aspx is breaking because it
cannot find my function.


var x = myFunc(); '// ('object expected' error here)


This code has been working for over a year and I haven't been working on
this page recently! arrrgh...

So I insert a "debugger" directive in the javascript on Page2.aspx

debugger
var x = myFunc();


But when I run the code in Visual Studio (2002), the debugger breaks at
the right spot yet the Tab in the top of VS shows Page1.aspx. It should
show Page2.aspx. The page is incorrect.

Is this a bug with Response.Redirect? Is the browser not switching page
contexts for some reason, and that's why it cannot find myFunc() at
runtime or in the debugger?


Help please.
Thanks
 

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,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top