MVC Preview - Part 1 - Displaying Data

In this updated introductory screencast on the Mix release of ASP.NET MVC, Scott Hanselman will walk you through writing controllers, pulling data from a model and displaying it in a view.

Be sure to watch the other three videos on ASP.NET MVC

ASP.NET MVC is available in the ASP.NET 3.5 Extensions Preview (December 2007) and the ASP.NET MVC Preview 2.

Presented by Scott Hanselman

Duration: 16 minutes, 41 seconds

Date: 28 February 2008

Watch the video   |   Download the video

Video downloads: WMV | Zune | iPod | PSP | MPEG-4 | 3GP

Audio downloads: AAC | WMA | MPEG-4 | MPEG-3 | MPEG-2

Comments : 18

Leave a Comment

random0xff : On March 06, 2008 2:54 PM said:

To make a strongly typed viewpage using generics, you kind of need to have a code behind file, right? Or can we specify that in the Page directive in the aspx file?

bcanonica : On March 06, 2008 4:40 PM said:

Great video love the format keep it coming, I travel to all these user groups and have heard MVC mentioned a ton, but now I am starting to really get a grasp of it by seeing it in action.

madka : On March 08, 2008 8:38 AM said:

Thank you for the Demo, is possible for you to publish the code of this tutorial, this is the way some of us understand best.

Thank you.

bdehamer : On March 11, 2008 6:04 PM said:

Scott, these screencasts are great -- just what I was looking for to get a jumpstart on ASP.NET MVC.  I like the talking head inset, but the head-to-frame ratio seems a little low.  If you're going to obscure part of the screen with with the inset, let's maximize the view of your mug and minimize the view of your interior decorating (nice paint choice).  Other than that small quibble, I'm loving it -- keep up the good work.

james evans : On March 12, 2008 8:11 AM said:

I liked the idea of MVC a lot and I liked your video. One thing that bothered me, and it may be just because this is a demo, is that in the product listing when you showed how hovering over the edit link that the product id was displayed in the url in the bottom border of the browser as expected. In some cases this may be a security problem and we may not want id's displayed. I'm sure there is a way around this?

james evans : On March 13, 2008 8:13 AM said:

I like MVC and your vidoe's. I don't like ID's displayed in the URL for security reasons (I work on medical applications - patient id's can present HIPPA issues). I'm sure there is a way around this right?

julio361 : On March 14, 2008 12:18 PM said:

Nice content and nice format of the video.

pschneider7 : On March 14, 2008 1:38 PM said:

The screencast are great and the implementation of the MVC pattern is already GREAT!

Could you post the examples you made? That would be nice!

shanselman : On March 14, 2008 5:46 PM said:

bdehamer - Good idea. I'll make the whole square smaller and move in closer to the webcam. Ya, I like the paint.

pschneider - All the exmaples are in the ASP.NET MVC section of my blog at http://www.hanselman.com.

random0xff - Yes, to the best of my knowledge, you need a code-behind for the generic deriviation stuff. I'll check though.

tthibodeau : On March 17, 2008 11:56 AM said:

You actually don't need a code-behind for generic ViewPage derivation.

See this great blog post for the details: www.squaredroot.com/.../MVC-Strongly-Type-ViewPages-Without-A-Code-Behind.aspx

shanselman : On March 17, 2008 3:25 PM said:

tthibodeau - That's obscure! Still, a great tip and thanks for digging that up!

brainmuffin : On March 20, 2008 4:58 PM said:

In the .Net world, I've been using the concepts of MVC for 4 years and in the Java world even longer.  Microsoft even has a best practices article for .Net 1.1 that talks about using MVC.  What is also missing though is a component Framework and a ORM layer.  In Java there's Spring and Hibernate, well, now they are in .Net too.  Why choose Microsoft MVC over Spring?

ddurose : On March 23, 2008 1:29 PM said:

I am familiar with MVC (from the Rails framework and from Java) and while I respect MVC in certain cases, I have to say that this demo was not very compelling.  Why would I want to do this?  Seems like a lot of work for a little bit of functionality.  Do you all provide scaffolding like Rails does?  I guess if you have a very simple site which only needs to do basic CRUD operations this might be worth it.  I  guess I'm not seeing the big advantage to it.  Why would I want to go into all these different template layout files and monkey with a bunch of standard HTML tags?  Seems so 1997'ish.  Please don't jam MVC down our throats.  I hope that MVC in the .NET framework is a just another feather in the cap of options available to us and not something that Microsoft is going to be forcing developers to adhere to.  As a .NET developer, I'm not sold yet.  Maybe over time as MVC becomes more mature in the .NET framework, I could see potentially using MVC if I have a project with specific needs that lend themselves to the MVC pattern.  Sorry if this sounds a little harsh - I realize this is an evolving technology for .NET.  I think for now I'm happy to just pull a GridView out on my canvas and just configure a data source to accomplish my CRUD ops.

wishstar99 : On March 25, 2008 2:48 PM said:

looks great, =)

a question, if the url is like

http://localhost:xxx/product/list

will it show http://localhost:xxx/product/list

or will it show http://localhost:xxx/product/list.aspx?

Looking forward for more examples.

wishstar99 : On March 25, 2008 2:49 PM said:

oops, i mean when using the Fiddler, will the url shows as http://localhost:xxx/product/list or http://localhost:xxx/product/list.aspx ... =)

ak99372 : On March 29, 2008 2:54 PM said:

The biggest software company and has to copy "small" Ruby on Rails open source. How come Microsoft cannot come up with something original themself? Maybe you should mention that in your video. I know you're going to say MVC was here since 70s but then how come Microsoft "waited" to release it now?

It is so dissapointing seeing Microsoft ripping off everything that is unique.

A.

shiju : On April 03, 2008 9:40 PM said:

Hi Scott,

please provide the support to Visual web dveloper to develop MVC applications

BoredRigid : On May 16, 2008 12:20 PM said:

ak99372, I really cant be bothered with that type of comment. My job is to be a developer and write software and therfore dont really care who invented what and when, all I need is the tools to do a job.

So, get a life and stop moaning.

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Sponsors