ASP.NET MVC CRUD Example 09 Edit Form and SQL update

preview_player
Показать описание
Part 9 of a c# web and database app example. In this video we will create a form to edit records and use a SQL statement to update the database.
Комментарии
Автор

I had the same issue as Ray T, but it was solved by removing the 'hidden' input type in the GadgetForm. I think this bit of text is extraneous since we defined a Gadget to instantiate with an Id value of -1. I'm not sure exactly what the form is doing, it seems to be checking if it's own property is -1 before we instantiate a Gadget, but I'm not quite sure. Hope that helps someone in the future!

ryanheitmann
Автор

When I press the details button on any item it returns the first item in the db, any suggestions?

tiagogoncalves
Автор

Hello there, there is a problem, try creating a new gadget, the view has an object reference not set to an instance of an object exception because it is expecting a GadgetModel with data?.

rayt
Автор

What in the world happened? Everything got changed to

gorandoko