Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Web Services
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
good
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[^]
  Permalink  
Comments
Arjun YK at 17-May-12 3:26am
   
I tried It, its not working
Arjun YK at 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 at 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
0 OriginalGriff 6,651
1 Sergey Alexandrovich Kryukov 6,400
2 CPallini 5,230
3 George Jonsson 3,574
4 Gihan Liyanage 2,542


Advertise | Privacy | Mobile
Web03 | 2.8.140921.1 | Last Updated 17 May 2012
Copyright © CodeProject, 1999-2014
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