Solved

Problem with Response.Redirect in .Net 4.0

Posted on 2010-08-16
3
840 Views
Last Modified: 2013-11-27
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.
0
Comment
Question by:drunk_irishman
  • 2
3 Comments
 
LVL 51

Accepted Solution

by:
Huseyin KAHRAMAN earned 500 total points
ID: 33447581
use server.transfer("newpage.aspx", true"

instead of redirect...
0
 
LVL 51

Expert Comment

by:Huseyin KAHRAMAN
ID: 33447593
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
 
LVL 1

Author Closing Comment

by:drunk_irishman
ID: 33447750
Thanks, very simple.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question