Solved

Problem with Response.Redirect in .Net 4.0

Posted on 2010-08-16
3
830 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:
HainKurt earned 500 total points
ID: 33447581
use server.transfer("newpage.aspx", true"

instead of redirect...
0
 
LVL 51

Expert Comment

by:HainKurt
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now