What is new in the ASP.NET 3.5 Extensions Preview

As I am sure you saw, we recently posted the ASP.NET 3.5 Extensions… I thought i’d do a brief introduction to some of the new features in this release by updating my mix07 demo MySilverlightTV…

Download the full sample here

MySilverlightTv(noVideos).zip (1.3MB)

Note, you can grab the “Data\Media” dir from the original one if you all the cool videos for a demo.


1.  Silverlight Support

We updated the old <asp:Media> control.. it is now called <asp:MediaPlayer>  here is an example usage:



This gives me a fully functioning media player that works on Firefox, Safri, IE, mac and windows.  I can chose from 10 or so stock templates for the look and feel or grab one and customize it in Expression (it is just a bunch of Xaml) to make it fit into my site..  Oh, and notice, there is no more click-to-activate and no client side JavaScript or Xaml coding required at all! 



Oh, I didn’t use it in this demo, but we also renamed <asp:Xaml> to <asp:Silverlight>

Read more about these in the ASP.NET Silverlight quickstarts


2. AJAX Support

We updated the history support and integrated it more deeply into the product… This gives developers full control of the meaning of the browsers forward and back buttons within their applications.  Rather than the <asp:History> syntax, there is now a simple property on ScriptManager called “EnableHistory.  Notice I am also setting EnableStateHash to false as it makes debugging easier as it leaves the URL string human readable.. you may or may not want that in your site, so it is an option.   Then I set a server side method HistoryNavigate that handles the pushing stuff into the property bag when navigating away and pulling it out of the property bag when navigating into the page.


Then, any time your app process a user action that represents a change it state, you can add a history point this creates a new “backbutton” state. 


Then, each time the page is navigated, you get a chance to check out that state and initialize your controls based on it.  Notice after I update the controls, I kick the UpdatePanel to update as well.. 


Read more in the Ajax quickstarts..


3. MVC within a Web Site project

There have been a ton of great MVC samples… This one I wanted to try what is not considered a best practice, but it does help you learn what is going on with MVC and web site projects.    I wanted to quickly write an RSS feed of the video in my site.   I used the data model I already had for this site, then added a very simple controller…   Notice the nice clean URLs I get?  Notice how i can pass in arguments so that folks can build up customer feeds?   It is simple to build your just about anything you can do wit Linq..


But the best part?  Check out the RSS feedcode.. I litterally just grabbed the feed from my blog and parameterized it based on the ViewData..  One tip, notice I had to start he Xml on the SAME LINE as the Page directives.. the ensures there is no leading whitespace (which the RSS spec does not allow)…


Read my full post on this… RSS Feed with the new ASP.NET MVC Framework



4. Dynamic Data…

Ok, ok.. I didn’t get a chance to add dynamic data to MySilverlightTV… but I still plan to.  In the mean time, check out Scott Hunter’s new blog.. he introduces dynamic data and will be talking about it more in the future.  Also, check out the quickstarts for a very good overview.



Comments (28)

  1. Altre risorse su ASP .NET 3.5 Extensions

  2. Jirapong says:

    Hi Brad,

    Congratulation on MVC related. i can’t wait to develop application on it.

    I have a question, Is MS MVC provide Silverlight 1.1 or 2.0 ViewEngine?



  3. Jirapong says:

    Hi Brad,

    Congratulation on MVC released. i can’t wait to write my first MVC application with it.

    I have a question, Is MS MVC provide Silverlight 1.1 or 2.0 ViewEngine?



  4. Wesley says:


    Funny, there’s not best practice and redundant code.

    Not using best practice is something you might decide because it saves you some work or because you just try to make a point in an example.

    Creating redundant code costs work so I don’t see any reason for that.

    Why not change the contents of the Top10 method to:




  5. BradA says:

    Jirapong asks if you can use MVC with Silverlight… Well you can certainly render Xaml in the view, no question.  But the app will still be a server centric application and will still round trip to the server for every interesting opperation.    That is more than OK in a number of scenarios, but I think the their are others that will require an MVC pattern for Silverlight specifically.  

  6. BradA says:

    Wesley — you are course correct, I could have called Top(10) in the implemention of Top10() but then I could not show off different Linq syntax 😉  

  7. Jeff Knutson says:

    Check out the ASP.NET homepage "Latest Weblogs" section for info on the new ASP.NET 3.5 Extensions CTP.

  8. Mike says:

    So why doesn’t the Silverlight control need to be activated in IE? You state that it needs no javascript, does that mean that Microsoft made an exception for the Silverlight ActiveX control wrt activation? Or do you mean that the javascript is written out for us?

  9. 昨日はイベントに出ていたためかなり遅い情報となっていますが、 ASP.NET 3.5 Extensions Preview がリリースされたようです。 ASP.NET 開発チームの方々が言及していますね。

  10. Link Listing – December 10, 2007

  11. Sharepoint How to: SharePoint and Microsoft Popfly working together to bring the best of Web 2.0 [Via:…

  12. DataSets DataSet enhancements in VS2008 ( link ) VS 2008 articles Weekend crash-course reading ( link

  13. Blogs says:

    We had a group of customers (and potential) customers out to campus earlier this week and I was asked

  14. Programming says:

    We had a group of customers (and potential) customers out to campus earlier this week and I was asked

  15. RomanB says:

    It is strange, but I can’t find none of EnableHistory-OnNamigate stuff in ScriptManager shipped with .NET 3.5 and VS 2008.

    (System.Web.Extensions.dll v3.5.21022.8).

  16. BradA says:

    RomanB – The cool new history stuff hasn’t made it into the framework yet… it is in the ASP.NET Extentions preview now, and will likely get rolled into an SP sometime next year..  

  17. Sox says:


    I think that sometimes you guys get lost in your own cleverness.

    For a long time now I have found that many of the sample downloads are a complete waste of time to many who would like to learn more.

    May I make several suggestions that may make things easier for your audience to digest.

    1. Always link to a working sample on the web.  I want to see what your code can do BEFORE I spend my time trying to figure out the code and get it working.

    2. Give basic instructions on how to load the downloaded code into your chosen web environment: VS2005; VS 2005 Express; VS2008; VS2008 Express.  Remember, if your targetted audience includes newbies, then cater for them.

    3. Update your samples when the beta/ctp code is released to manufacturing.  I would like to load this into the full version of VS2008, but it is not a simple matter of creating a new VS2008 web site and copying the files. So after downloading the code, unzipping it and creating a new project, I am going to walk away…

    Brad, I am not picking on you specifically, but this applies to Scot Guthrie and others in the ASP.NET Guru circuit.

    You need to market to the new, the uninitiated, the unwashed, school students, PHd’s, as well as the MSG’s (Microsoft Geeks).

    I really would like to see your stuff and check out your code.

    Why else would I take the time and trouble to write to you.

    If anyone else feels the same about code samples, please add your voice to this plea for simplicity.

  18. Chuck says:

    I agree with Sox – you guys are making it too difficult to use the downloads and code samples. Embedding Word 2007 readme files, not specifying the minimum requirements to run the samples, etc.

  19. 无常 says:


  20. cnblogs.com says:

    在IT行业,中文的资料永远都比英文的慢几个月,而且原创性的也少得可怜,有空时,不妨去这些英文技术BLOG溜达溜达,也许会有意外的惊喜。 好的C#博客应该符合这些条件: 有用的新闻、信息、技巧和代码例子

  21. Moe says:

    Why is it that when I click on any image on this page I get the exact image in an empty window? Is this the latest thing or just lazy coding? Either way, its poopie.

  22. Moe Again says:

    Just read Sox’s post, I totally agree with him 100% on each point, We are pleaing for simplicity.

    Chuck is right-on too. Damn, I thought I was the only one trying to drudge through the much of unnecessary code;

    Are the "gurus"/AJAX’ers trying to make something that is simple in nature too complex…

    Think I’ll eat some lunch now, when I get back, all the world’s problems better be solved… ok, ok, I’ll settle for having this AJAX mess being cleaned up, Brad keep me posted on the progress of this clean-up effort, thanks.

  23. Philip the Duck says:

    I downloaded this sample a couple of days ago and now have it working nicely. When I discovered the Upload feature does nothing, I looked at the code and was fascinated to see the Upload.aspx.cs file contains a bunch of commented-out code which appears to create a job in a job queue in an "Encoder" database, via an EncoderDataContext, neither of which are included in this sample.

    Is this a work in progress? Would this by any chance be related to some sort of service you’re working on to take these jobs and drop them through the Expression Encoder command-line interface and publish the transcoded media files either back into this demo’s Media directory or even to an online service such as Silverlight Streaming?


  24. Brad Abrams says:

    Yes, philip, the Encoder part is still in the works… I am working with the Expression Encoder folks on an API of some kind to let you do this on the server…    I will post more when we have it more solid!

  25. rox19840702 says:


  26. 布衣 says:

    在IT行业,中文的资料永远都比英文的慢几个月,而且原创性的也少得可怜,有空时,不妨去这些英文技术BLOG溜达溜达,也许会有意外的惊喜。 好的C#博客应该符合这些条件: 有用的新闻、信息、技巧和代码例子 定期更新 原创内容,不是广告文章盗用别人的文章 良好的组织,包含分类和tags 健康的讨论和读者评论 有一定的个人见解,最好还有点幽默感,但又不是自己在嗐吹牛