More info and downloads:
https://blog.michaelckennedy.net/2012/01/20/building-asp-net-mvc-forms-with-razor/
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:
Amazon Auto Links: No products found.
Sure, basically if you are competent in C# and .NET you should be good to go.
Excellent tutorial. You did a great job at explaining each step. Have you written any books on MVC forms?
you explained things so nicely, which others tend to “skip” over. Thanks bud!!
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 🙂
Can you tell me what kinds of skills you need to have before attending this class?
Hi Juan,
Sorry, I’m not sure what you mean exactly. Could you elaborate?
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
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.
Thanks everyone!
thank u very much
hi michael, great tutorial, however I encounter a problem with the type namespace Product. It generate errors, am I missing something?
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.
Very well made and explained video. Thanks very much!
Does anyone knows how to get the value from a combobox (select)
Good point, didn’t thought about that.
great video. very helpful
Where are the Model? for the example?
Razor is fucking trash, that shit is nothing but inefficient.
HI michael i can’t find out the example mvc form how get that sample code the given url is not working plz help
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
I have been programming with vb.net for many years. only use c# when I have to fix something.
Hi..Michael…Can u help me out…how to write a code for create,edit & delete contacts using c# MVC4..Thanks in advance
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)
super
Hey Michael, Thx for this great tutorial, please don’t stop! Greetings from Switzerland
Brg Michael 😉
Thank you for quick and solid introduction.
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.
nice video, thank you!
Thank you it is great help for new comer on MVC
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.
You don’t need to create new product and pass it to create view.