Yousuf Tafhim
Yousuf Tafhim

Reputation: 361

Make model class from view in ASP.NET MVC

In ASP.NET MVC one can create strongly typed Views but suppose if a view has already been made, so would it be possible to derive a model from it?

Like create model from view. A possible scenario would be: a designer makes a view (with forms) and then the developer would create a model from that form

Upvotes: 1

Views: 296

Answers (1)

John Farrell
John Farrell

Reputation: 24754

Possible? Yes.

You could certainly translate <input type="text" data-format="int" name="Price" /> into public int Price { get; set; }

Devil is in the details though.

Upvotes: 2

Related Questions