vendredi 7 octobre 2016

Dynamic Model in MVC 4.0

Our Application is developed using MVC 4.0. We have a MVC view that's is attached to Dynamic Model.(@model dynamic)

When we submit the view , the dynamic model is posted as an object to Submit Action. Inside Submit Action, we are trying to capture this dynamic model and cast to a typed model. But it's not working, we tried all suggestions provided online but still no luck.

MVC View --> Attached to dynamic model (@model dynamic) On Submit click ---> Call Submit Action Result Method Submit Action Result ---> Catch the posted dynamic model and cast it to typed model. Let's say we have a typed model call product.cs. All we need to do is cast the posted dynamic model to product.cs in the submit action result!!!

Aucun commentaire:

Enregistrer un commentaire