Building ASP.NET MVC Forms with Razor (ASP.NET MVC Foundations Series)

More info and downloads:

In this ASP.NET MVC Foundations screencast, we’re going to look at building an ASP.NET MVC page which allows users to create and edit objects in our domain. We’ll cover just the basics of using HTML helpers to map model properties to our HTML form and Model Binding to convert our HTML form back into our rich domain object.

We’ll start with a very basic store website which has read-only data and we’ll add the ability to create and edit products in our store. See the original blog post here:


Michael Kennedy says:

Sure, basically if you are competent in C# and .NET you should be good to go.

Sheryl White says:

Excellent tutorial. You did a great job at explaining each step. Have you written any books on MVC forms?

theDIGITALperception says:

you explained things so nicely, which others tend to “skip” over. Thanks bud!!

bartdereu says:

my god , i can’t believe i have to deal with this way of MVC. The most horrific software ever build must be visual studio 🙂

Nick Varpness says:

Can you tell me what kinds of skills you need to have before attending this class?

Michael Kennedy says:

Hi Juan,

Sorry, I’m not sure what you mean exactly. Could you elaborate?

Michael Kennedy says:

Hi there.

Thanks for the comment. SOMETIMES this is true. Consider the following model:

class Book {
public string Name {get; set;}
public PageCount {get; est;}

You do not need to create that one. But what if you want to pass in default values? For example:

class Book {
public string Name {get; set;}
public PageCount {get; est;}
public string Author {get; set;}

public Book(string author) {
Author = author;

Then you do. Similarly if you want to chose constructors, etc

grettel rivera rojas says:

Hi Michael , do you know some way to add the data from a Database to a dynamic table in razor?. I get the result of that data and I reach to put a column in a dropdown list, but I do not know how to put some of the columns of the select into a dynamic table.  I really appreciate your help.

Michael Kennedy says:

Thanks everyone!


thank u very much

jenan savanath says:

hi michael, great tutorial, however I encounter a problem with the type namespace Product. It generate errors, am I missing something?

Michael Kennedy says:

Right, ok. So I think that’s plenty of background to take the class. It is in C# but basically, it’s more about the APIs, Razor, etc. Not the language. Check it out in the updated description.

Eric Sondergard says:

Very well made and explained video. Thanks very much!

Jodaine Moore says:

Does anyone knows how to get the value from a combobox (select)

DrQmal says:

Good point, didn’t thought about that.

tiobacca says:

great video. very helpful

Juan Carlos Calix says:

Where are the Model? for the example?

Kid Power says:

Razor is fucking trash, that shit is nothing but inefficient.

Sarath R says:

HI michael i can’t find out the example mvc form how get that sample code the given url is not working plz help

grettel rivera rojas says:

Hi Michael , do you have an example where you use something similar to a Dagridview? I need to create a report with a list of item base on a search criteria.

Thanks in advance

Nick Varpness says:

I have been programming with for many years. only use c# when I have to fix something.

amrutha reddy says:

Hi..Michael…Can u help me out…how to write a code for create,edit & delete contacts using c# MVC4..Thanks in advance

simphu says:

Hey Michael great screencast, explains a lot about views and how to show em up in UI. Can we implement ajax based submit button? (Instead of postback of form)

Balaji Dabbara says:


elextremo89 says:

Hey Michael, Thx for this great tutorial, please don’t stop! Greetings from Switzerland
Brg Michael 😉

godvad says:

Thank you for quick and solid introduction.

Deepak Fialok says:

Thanks Micheal for sharing such a practical video tutorial….Please keep updating your list … would request you to please upload something related to .

1. Create a registration form (which you have covered)
2. Send confirmation mail to email
3. Session creation
4. Search item
5. Filter Search items.

Irshu LX says:

nice video, thank you!

Sai Ram Patnaik says:

Thank you  it is great help for new comer on MVC

EnduranceT says:

Hey Michael, interestingly, I only know ASP.NET MVC and not ASP.NET Web Forms or anything simpler. Is it possible to make a simple form like this in plain old Web Forms? For example, if I had a portfolio site and I just want to use some CaptCHA and other input validation, but otherwise dont need any real server-side processing, I really don’t want the complexity of MVC… But can this still be done with ASP.NET? Thanks.

DrQmal says:

You don’t need to create new product and pass it to create view.

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!