MVC5 - Server Side Processing - Bind Data to Viewmodel

MVC5 - Server Side Processing - Bind Data to Viewmodel

BoneyBoney Posts: 2Questions: 1Answers: 0

I am setting up a datatable for server side processing, and it works well, but I need to figure out how to bind that data to my viewmodel so that I can post it back to the controller.

My datatable is in a form and will collect some user input, but the collection is null when I submit the form. Can anybody point me in the right direction, or provide code examples, please?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Best bet is to a web search - threads here, like this may help, or possibly this on SO,

    Colin

  • BoneyBoney Posts: 2Questions: 1Answers: 0

    Thanks, Colin. However, the questions you linked seem to be about a basic implementation of a datatable.

    I have the table implemented, using server side processing, and displaying data as intended. My issue is trying to figure out how to bind the data that is being displayed in the table to my view model so that I can then submit that data back to the server from my form.

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    I suspect you'd be best asking on a .NET forum or StackOverflow. I'm not aware of how to bind form data to a View Model.

    Allan

  • Jay1001Jay1001 Posts: 2Questions: 0Answers: 0

    Hey Boney, did you ever figure this out? I'm running into this issue now.

Sign In or Register to comment.