我是新來的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? –