0
我都已經使用URL路徑,但有時我覺得像HTML代碼沒有渲染網址路線HTML渲染不
這是我在代碼的Global.asax
void Application_Start(object sender, EventArgs e)
{
RegisterRoutes(RouteTable.Routes);
}
public static void RegisterRoutes(RouteCollection routeCollection)
{
routeCollection.MapPageRoute("LogIn", "logga-in", "~/Login.aspx");
routeCollection.MapPageRoute("Contact", "kontakt", "~/Contact.aspx");
routeCollection.MapPageRoute("About", "om", "~/About.aspx");
routeCollection.MapPageRoute("Job", "jobb", "~/Job.aspx");
routeCollection.MapPageRoute("Connect", "anslut", "~/Connect.aspx");
routeCollection.MapPageRoute("Default", "", "~/Default.aspx");
routeCollection.MapPageRoute("Booking", "bokning/{Id}", "~/Booking.aspx");
routeCollection.MapPageRoute("DashboardDefault", "panel/", "~/Dashboard/Default.aspx");
routeCollection.MapPageRoute("DashboardAbout", "panel/om", "~/Dashboard/About.aspx");
routeCollection.MapPageRoute("DashboardContact", "panel/kontakt", "~/Dashboard/Contact.aspx");
routeCollection.MapPageRoute("DashboardLogIn", "panel/logga-in", "~/Dashboard/Login.aspx");
}
當去到aspx網站everyting正在工作正常ex http://www.dentalo.se/dashboard/login.aspx se image below
嘗試訪問相同的pa ge,但用友好的網址代替http://www.dentalo.se/panel/logga-in 它看起來像這樣。
任何人都可以幫我解釋爲什麼會發生這種情況嗎?我知道確切的說,JavaScript也不是渲染。
好吧,我明白了。多謝了朋友。 – user3046164
我很高興你發現我的答案有幫助 –