Click here to Skip to main content
15,887,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

1 solution

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[^]
 
Share this answer
 
Comments
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900