Click here to Skip to main content
12,999,580 members (105,745 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I'm unable to navigate form one page to another using web services. I tried Using the following code - HttpContext.Current.Response.Redirect("mypage.aspx"); and it is showing the following error- Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. Thanks In Advance. Expecting a reply ASAP
Posted 16-May-12 20:23pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

In place of HttpContext.Current.Response.Redirect("mypage.aspx"); you have to use HttpContext.Current.Response.Redirect("mypage.aspx", false); method to suppress the internal call to Response.End.

Look here for details: Microsoft Support: ThreadAbortException Occurs If You Use Response.End, Response.Redirect, or Server.Transfer[^]
Arjun YK 17-May-12 3:26am
I tried It, its not working
Arjun YK 18-May-12 3:02am
If i use that i'm not getting any error. But its not navigating to Default.aspx page
Sandeep Mewara 23-May-12 2:44am
Not sure of what you are doing. Sounds like before navigation, you are destroying your response all together to act.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 17 May 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100