如何解决如何在起始页中隐藏/更改 URL?
protected void Application_Start(object sender,EventArgs e)
{
// Code that runs on application startup
RegisterRoutes(RouteTable.Routes);
}
static void RegisterRoutes(RouteCollection routes)
{
//routes.MapPageRoute("Uniquename","Name to shown on Adddress bar AND for redirecting","Physical Path to the page");
routes.MapPageRoute("Home","StoreFrontPage","~/BestSeller.aspx");
routes.MapPageRoute("index","MainPage","~/index.aspx");
routes.MapPageRoute("ProductDetails","DetailOfProduct","~/ProductDetails.aspx");
}
当我使用“href”或“response.redirect”时,上面的代码可以帮助我更改网址的名称,因此当我打开第一个网页(起始页面)时,我无法隐藏网址。 我不希望用户看到 pages.aspx 文件的名称。 感谢您的任何建议/帮助!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。