Advertisement
Guest User

Untitled

a guest
Jul 28th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. //Model
  2. public class Car
  3. {
  4. string name{get;set;}
  5. double speed {get;set;}
  6. //etc.
  7. }
  8.  
  9. //Controller
  10. public ActionResult ModifyCar(Car c)
  11. {
  12. c = GetAdditionalData(c.name, c.speed);
  13. return View(c);
  14. }
  15.  
  16. //View
  17. @model Car
  18. <form id="carform" method="post" action="/Car/ModifyCar"> //Guessing
  19. <input id="carName" /> //Somehow bind with @model.name
  20. <input id="carSpeed" /> //Somehow bind with @model.speed
  21. <input type="submit" /> //Somehow send the model to the controller
  22. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement