Jaa


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:

image

 

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! 

image

 

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.

image

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. 

image

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.. 

image

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..

image

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)...

image

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.

 

Enjoy!

Comments

  • Anonymous
    December 09, 2007
    PingBack from http://www.absolutely-people-search.info/?p=5061

  • Anonymous
    December 09, 2007
    Altre risorse su ASP .NET 3.5 Extensions

  • Anonymous
    December 09, 2007
    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? Thanks, -Jirapong

  • Anonymous
    December 09, 2007
    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? Thanks, -Jirapong

  • Anonymous
    December 09, 2007
    Brad, 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: Top(10); Cheers, Wes

  • Anonymous
    December 10, 2007
    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.  

  • Anonymous
    December 10, 2007
    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 ;-)  

  • Anonymous
    December 10, 2007
    Check out the ASP.NET homepage "Latest Weblogs" section for info on the new ASP.NET 3.5 Extensions CTP.

  • Anonymous
    December 10, 2007
    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?

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

  • Anonymous
    December 10, 2007
    Link Listing - December 10, 2007

  • Anonymous
    December 10, 2007
    Sharepoint How to: SharePoint and Microsoft Popfly working together to bring the best of Web 2.0 [Via:...

  • Anonymous
    December 12, 2007
    DataSets DataSet enhancements in VS2008 ( link ) VS 2008 articles Weekend crash-course reading ( link

  • Anonymous
    December 14, 2007
    We had a group of customers (and potential) customers out to campus earlier this week and I was asked

  • Anonymous
    December 18, 2007
    We had a group of customers (and potential) customers out to campus earlier this week and I was asked

  • Anonymous
    December 26, 2007
    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).

  • Anonymous
    December 27, 2007
    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..  

  • Anonymous
    December 31, 2007
    Brad, 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.
  • Anonymous
    February 15, 2008
    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.

  • Anonymous
    February 19, 2008
    在TI行业,中文的资料永远都比英文的慢几个月,而且原创性的文章也少得可怜,有空时,不妨去这些英文技术BLOG溜达溜达,也许会有意外的惊喜。

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

  • Anonymous
    February 22, 2008
    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.

  • Anonymous
    February 22, 2008
    The comment has been removed

  • Anonymous
    February 24, 2008
    The comment has been removed

  • Anonymous
    February 25, 2008
    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!

  • Anonymous
    February 27, 2008
    12月16日链接篇: ASP.NET, ASP.NET AJAX, ASP.NET MVC, VS, .NET, IIS7, WPF

  • Anonymous
    August 17, 2008
    http://blogs.msdn.com/brada/archive/2007/12/09/what-is-new-in-the-asp-net-3-5-extensions-preview.asp

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