ASP.NET MVC: Model in strongly typed view not populating
I am brand spanking new to ASP.NET MVC and I'm working through a tutorial to get the basics. The tutorial is in C# and I'm converting it to VB to stay consistent with some related projects. I have to assume that I'm missing something in that conversion but can't figure out what it could be.
I have the following class:
Public Class GuestResponse Public Name As String Public Email As String Public Phone As String Public WillAttend As Boolean?End Class
Unfortunately, the form data from the post request isn't being populated in my GuestResponse class. If I insert a breakpoint in that action method, all the GuestResponse properties are empty. At the same time, the Request.Form values look as expected - they're just not filling in the GuestResponse object.
I'm sure it's something small I'm missing. Any help is appreciated.
* ASP .NET MVC 5ASP.NETVisual Basic.NET.NET Programming
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.