我是新来的asp.net和c#。我设置了一个查询字符串,将值传递给另一个页面以及url路径。但一旦转到此页面,我将无法重定向到任何其他页面。走出URL.Authority?
这里是我的代码:
Uri url = System.Web.HttpContext.Current.Request.Url;
string urlString = "http://" + url.Authority + "/Projects/SearchResult.aspx/?Keywords=" + TxtSearch.Text;
Response.Redirect(urlString);
以下是错误:
The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Projects/Description.aspx/NewPost.aspx
为什么downvote? –