Homepage | About Me | Mayday | Testing ASP.net Book | Follow me on Twitter | GitHub | SlideShare | RSS | DropBox referral link
Blog.BenHall.me.uk

ASP.net MVC RC1 - ViewData.Model becomes Model

Wednesday, January 28, 2009

With RC1, the team has added a top-level property to access the Model for the page. As such:

image

 

Becomes:

 

image

 

Both work the same, however the second is just a little bit cleaner as you don’t need to go via ViewData…

Labels:

Blogger comments

At 3:26 PM, Blogger Elijah Manor said...
Nice, I look forward to updating my existing code. Thanks for the tip!

http://twitter.com/elijahmanor
http://zi.ma/webdev    
At 6:31 PM, Blogger Snake_Pit_27 said...
Thanks a lot for this post. I've been playing with ASP.NET MVC recently, and it is a delight. Yes, there is more manual coding than with Web Forms, but it is worth it for the additional control you gain.

i've read more on ITJOBLOG, may be you could have a look..

http://www.itjoblog.co.uk/2009/03/aspnet-mvc-rescues-microsofts.html    
At 7:23 PM, Blogger Snake_Pit_27 said...
Thanks a lot for this post. I've been playing with ASP.NET MVC recently, and it is a delight. Yes, there is more manual coding than with Web Forms, but it is worth it for the additional control you gain.

i've read more on ITJOBLOG, may be you could have a look..

http://www.itjoblog.co.uk/2009/03/aspnet-mvc-rescues-microsofts.html