ASP.NET MVC and Silverlight

To learn more about ASP.NET MVC visit

This example is showing different ways of using MVC Views that access the same controller and model.

The First and Second page is using the regular MVC HTML renderer. Each of these pages uses the strongly typed ViewPage and loop over the data returned foreach (var link in ViewData.Model) The BookMarksDataSet is a DataSet (xsd) based on a MS Access DB and is used for all examples. See Building a DAL using Strongly Typed TableAdapters and DataTables in VS 2005 and ASP_NET 2_0 – ScottGu’s Blog for more info.

The third view uses the javascript library Extjs . The data returned to the comboboxes and datagrid is called via Ajax. The Bookmark controller return the data in Json format. Even updating and saving the data is done in this way (Only logged in users can do this). The javascript code is embedded into the aspx page for example purposes.

The last page uses a SilverLight DataGrid Control to show the links. The data is retrieved via a WebClient WebClient downloader = new WebClient(); and transformed into a JSONArray. Updates and saving the data also make use of JSON. To accomplish this, I created a Generic Json Store that inherits from a generic ObservableCollection. The constructor takes a URL as parameter which is in fact a controller action from the ASP.NET MVC application. The store loads the data and triggers a loadcompleted event once done to the page to set the datacontext.

from here

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • MisterWong
  • Y!GG
  • Webnews
  • Digg
  • StumbleUpon
  • Reddit
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • XING

0 thoughts on “ASP.NET MVC and Silverlight

  1. Is this example going to be open sourced? Just curious. I like what I see, and want to check out the source.

    Also, if you get a moment, could you describe your findings with the interfaces? Like, which was easiest, hardest, most interesting, etc.

    Thanks for your time,

    Jesse Foster | jf26028

Leave a Reply

Your email address will not be published. Required fields are marked *