Guest User

Untitled

a guest
Feb 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6.  
  7. namespace WebApplication2.Controllers
  8. {
  9. public class HomeController : Controller
  10. {
  11. // GET: Home
  12. public ActionResult Index()
  13. {
  14. return View();
  15. }
  16.  
  17. // GET: Home
  18. public ActionResult NumInfo(float num)
  19. {
  20. return View(num); //passing model (model is object)
  21. }
  22.  
  23.  
  24. public ActionResult StringInfo(string str)
  25. {
  26. str = "Default";
  27. return View(model:str); //passing model (model is object)
  28. }
  29.  
  30. }
  31. }
Add Comment
Please, Sign In to add comment