Click here to Skip to main content
11,584,622 members (66,099 online)
Rate this: bad
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
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 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 430
1 Sergey Alexandrovich Kryukov 367
2 Dave Kreskowiak 260
3 Richard Deeming 220
4 virusstorm 194
0 OriginalGriff 1,703
1 Sergey Alexandrovich Kryukov 1,267
2 Abhinav S 711
3 Dave Kreskowiak 687
4 Suvendu Shekhar Giri 568

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