Problem with Response.Redirect in .Net 4.0

I am using VS 2010 and .Net 4.0 and when I use the Response.Redirect in code it throws an exception and craps out.  Here is the text of the exception:

Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

I've seen a few others complaining about Response.Redirect not working in 2010 either but no solutions.

I'm simply trying to navigate to my main page after confirming the users login/password credentials.  Thank you for any and all help.
LVL 1
drunk_irishmanAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
HainKurtConnect With a Mentor Sr. System AnalystCommented:
use server.transfer("newpage.aspx", true"

instead of redirect...
0
 
HainKurtSr. System AnalystCommented:
dont use redirect if you are trying user to go to another page which is on the same server with page 1

server.transfer("newpage.aspx", true)
0
 
drunk_irishmanAuthor Commented:
Thanks, very simple.
0
All Courses

From novice to tech pro — start learning today.