Bum*_*Bee 2 c# redirect response
在尝试重定向另一个页面时,我收到"Internet Explorer无法显示网页"错误.
string targetURL = "~/AnotherForm.aspx?Xresult=" + HttpUtility.UrlEncode(res);
Response.Redirect(targetURL);
Run Code Online (Sandbox Code Playgroud)
谢谢BB
ResolveURL()使用它Response.Redirect(),与UrlEncode不能很好地协同工作,试试这个:
string targetURL = "~/AnotherForm.aspx?Xresult=" + HttpUtility.UrlEncode(res);
Run Code Online (Sandbox Code Playgroud)
同时检查这个相关的SO答案:Response.Redirect使用~Path
| 归档时间: |
|
| 查看次数: |
1034 次 |
| 最近记录: |