Hi
Im looking on some routes.MapPageRoutes but i cant get it to work.
I have these link
ROOT
default..aspx
brands.aspx
service.aspx
contact.aspx
aboutus.aspx
shopping.aspx
ALL these pages is running with a masterpage
eb.master (also in the root)
And then i have the global file that have the namespace in the global file also.
when im running the pages/website and i have the default.aspx page activ, it show
www.mydomain.dk/default.aspx
when i wanted it to be
www.mydomain.dk/Butikken
Its the same problem with the others routes, can someone help me !?
Code:<%@ Application Language="VB" %> <%@ Import Namespace="System.Web.Routing" %> <script runat="server"> Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs on application startup '///// Denne linje er den der kalder Sub'en RegisterRoutes ved opstart, er meget vigtig. ///// RegisterRoutes(RouteTable.Routes) End Sub Sub Application_End(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs on application shutdown End Sub Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when an unhandled error occurs End Sub Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when a new session is started End Sub Sub Session_End(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when a session ends. ' Note: The Session_End event is raised only when the sessionstate mode ' is set to InProc in the Web.config file. If session mode is set to StateServer ' or SQLServer, the event is not raised. End Sub '///// Dette Sub er vigtig i Routes, sammen med import namespace System.Web.Routing. ///// Sub RegisterRoutes(ByVal routes As RouteCollection) 'for de forskellige link adresses/ruter skal der laven en routes.MapPageRoute("", _ "Butikken", _ "~/default.aspx") ' adresse nr. 2 routes.MapPageRoute("", _ "Brands", _ "~/brands.aspx") ' adresse nr. 3 routes.MapPageRoute("", _ "Kontakt", _ "~/contact.aspx") ' adresse nr. 4 routes.MapPageRoute("", _ "VoresService", _ "~/service.aspx") ' adresse nr. 5 routes.MapPageRoute("", _ "OmOs", _ "~/aboutus.aspx") ' adresse nr. 6 routes.MapPageRoute("", _ "OnlineButik", _ "~/shopping.aspx") End Sub </script>


Reply With Quote

