Skip to main content
Home Forums General Silverlight New Features in Silverlight 3 RESTful Silverlight
2 replies. Latest Post by Druad828 on November 9, 2009.
(0)
Druad828
Member
0 points
2 Posts
11-05-2009 3:56 PM |
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}
I have an ADO.NET Data Service which presents my data in a really nice RESTful manner. I’d like my Silverlight UI to match. In other words, when my service sees:
http://... /service.svc/Team(2L)/Players
it returns a list of the players for team #2…which is great! I have a Silverlight Navigation app which has a Page called “Team” which contains a TabControl with a tab which contains a DataGrid of the players. I’d like to navigate to this Page / Tab Item using a similar restful methodology, so that:
http://.../Default.aspx#/Team/Team(2L)/Players
presents the team navigation page with team #2 displayed in the data and the players tab selected presenting the list of players in the data grid. I know the key to this is the UriMapper class, but I’d really appreciate some additional guidance on this. Any thoughts?
Mog Lian...
All-Star
15960 points
1,551 Posts
11-09-2009 4:27 AM |
Hi,
Yes, this could be done by UriMapper.
NavigationContext.QueryString[
Please have a test.
Thanks,
11-09-2009 10:54 AM |
Thanks Mog,
Yes, that works perfectly...now all I need to do to reflect the URI changes back to the browser, so that when a user browses through the Teams or changes the tab selection, the URI reflects those actions. That way, the browser histroy will reflect the user's actions and the forward/back buttons will work correctly. Then it will be like a "real" web app.
-Nelson