Adding A Sessions Page That Includes a Query Parameter In Silverlight VS2010 Beta2 (Article 6 of 7)


  Title Of Each Article Video Included With Each Post
Part 1 Introduction To RIA Services In Silverlight (This Article) 7 Minutes
Part 2 Basic RIA Services And DataGrid With  VS 2010 Tooling 14 Minutes
Part 3 Adding A DataGrid With Connect The Dots DataBinding in VS 2010 13 Minutes
Part 4 Adding a Navigation Page to a Silverlight Business Application Template 11 Minutes
Part 5 Adding Speakers Page Template With Converters In Visual Studio 2010 Beta2 11 Minutes
Part 6 Adding A Sessions Page That Includes a Query Parameter In Silverlight VS2010 Beta2 10 Minutes
Part 7 Basic Authentication and Authorization In RIA Services 5 Minutes

[media id=7]

In this section, we will talk about what happens when the users presses the “Sessions” hyperlink from the speakers page.  If you remember from the last article, we used a special converter on the Speakers.xaml page and bound that to the hyperlink titled sessions as shown below.




When this link is clicked, the navigation created is as follows:


// Executes when the user navigates to this page.
protected override void OnNavigatedTo(NavigationEventArgs e)
    //Handle SpeakerId
    var qs = NavigationContext.QueryString;
    if (qs.ContainsKey("SpeakerId"))
        this.sessionsOverviewDomainDataSource.FilterDescriptors =
            new FilterDescriptorCollection();
              new FilterDescriptor("AttendeeId",
                  FilterOperator.IsEqualTo, qs["SpeakerId"]));

This simply adds a filter to the current DomainDataSource that filters the column AttendeeId with the passed in query parameter SpeakerId.


The resulting page looks as follows assuming Peter Kellner’s Session link was clicked.




The video referenced in this article goes into building this page in more details, but fundamentally, the major point is just the query parameter.

About Peter Kellner

Peter is a software professional specializing in mobile and web technologies. He has also been a Microsoft MVP since 2007. In addition, he’s a multi-course video author at Pluralsight. To read more about Peter Kellner and his experience click here. For information about how Peter Kellner might be able to help you with your project click here.

Follow me:


  1. Alyssa Wedman says:

    I have not heard of Omnis before. Thanks for this review, you basically have outlined the pros and cons of hosting with Omnis. I am looking forward to more reviews from you.


Get every new post delivered to your Inbox

Join other followers: