Search code examples
silverlightsilverlight-4.0url-routingsilverlight-toolkit

Silverlight: Navigation app template - can we have cleaner urls? And urls like asp.net MVC / Routing has?


I have just created a new silverlight app using Silverlight navigation template. All went well and its working :-)

But the url has an extension of aspx ... can we not remove like asp.net MVC has done?

    SilverlightApplication1TestPage.aspx

The next thing that i found strange is how it appends the page name, it uses # symbol like so

    SilverlightApplication1TestPage.aspx#Home

I thought it would be more natural to do this (also like asp.net mvc does)

     SilverlightApplication1TestPage/Home

     SilverlightApplication1TestPage/About

Is there a kind of work around or updated tamplete of some kind

Or its not possible?

Thanks


Solution

  • THanks everyone for comments, it got me thinking... and i think i have fixed it.. and found a solutions using asp.net 4.0 routing...

    Add a global file to the asp.net project and then add this to application start

    // Code that runs on application startup
            RouteTable.Routes.MapPageRoute("SilverlightRoute",
            "MyApp",
            "~/SilverlightApplication1TestPage.aspx");