1
我在我的web表單中使用路由。例如:如何從asp.net中獲取原始網址?
routes.MapPageRoute("Home", "HomePage", "~/Default.aspx");
,我重定向到頁面
Response.RedirectToRoute("Home");
現在有一個函數(或解決方案)在asp.net,這將使它路由名稱[首頁](或URL參數[ HomePage])並返回原始地址(Default.aspx)?
非常感謝。
謝謝回答。其他問題,但是,類似於上一個問題:是否有一個函數會給它的URL參數(HomePage)和返回路由名稱?謝謝。 –
好的。我找到我的答案在http://stackoverflow.com/questions/721392/asp-net-system-web-routing-find-actual-aspx-page 我的答案是Page.AppRelativeVirtualPath; –