Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Model
- public class Car
- {
- string name{get;set;}
- double speed {get;set;}
- //etc.
- }
- //Controller
- public ActionResult ModifyCar(Car c)
- {
- c = GetAdditionalData(c.name, c.speed);
- return View(c);
- }
- //View
- @model Car
- <form id="carform" method="post" action="/Car/ModifyCar"> //Guessing
- <input id="carName" /> //Somehow bind with @model.name
- <input id="carSpeed" /> //Somehow bind with @model.speed
- <input type="submit" /> //Somehow send the model to the controller
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement