Reputation: 16186
My Silverlight application, using the navigation framework, has very pretty endings to its URLs, due to use of the URI mapping it does. But the front end still looks nasty, like:
http://server:port/SilverlightPage.aspx#/uri-mapped-portion
How can I get the "SilverlightPage.aspx#" portion to look nicer, preferably removing the ".aspx#"?
Upvotes: 0
Views: 1411
Reputation: 4004
You could use URL routing which is available as part of ASP.NET MVC or regular ASP.NET http://msdn.microsoft.com/en-us/library/cc668201.aspx
Edit: To answer your question in the comment:
I haven't worked with this myself, but if you look at the "Using routing with WebForms" section, it should explain it in detail. From what I gather you could use
routes.Add("SomeRoute", new Route("SilverlightPage",new CustomRouteHandler("~/SilverlightPage.aspx")));
Upvotes: 2
Reputation: 8670
You could use the default page instead of SilverlightPage so that it would be just:
Another way to get prettier pages is to use something like ASP.NET MVC which has pretty urls also. Then you could have something like:
Upvotes: 1