简体   繁体   中英

Response.Redirect doesn't work in .net 4

where used on http://localhost:8692/Contacts/Default.aspx Response.Redirect(" http://www.google.com ") redirects to http://localhost:8692/Contacts/http%3a%2f%2fwww.google.com

The problem just appeared once I upgraded to .Net 4

Edit: Response.Redirect("~/Contacts/MemberDetails.aspx?Id=3") goes to http://localhost:8692/Contacts/%2fContacts%2fMemberDetails.aspx%3fId%3d1

I found one mention of this on the web but no solution and it was for the release candidate http://forums.asp.net/t/1527814.aspx

Are you using the Ajax Control toolkit at all? Same issue was happening to me and the fix was to download the toolkit for the .net 4.0 version. I was using the ToolkitScriptManager which might have been the ultimate problem, but the new Ajax Toolkit for .net 4.0 seems to have solved it!

I was getting this same issue in the form of an extra encoded forward slash as a suffix for table.ListActionPath.
Very annoying but it had to do with the Ajax toolkit 3.5 -4 upgrade requirement mentioned above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM