Guest User

Untitled

a guest
Jul 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public class HomeController : Controller
  2. {
  3. public ActionResult Index(string id)
  4. {
  5. return View();
  6. }
  7.  
  8. public ActionResult About(string id)
  9. {
  10. return View();
  11. }
  12. }
  13.  
  14. @Url.Action("About", "Home")
  15.  
  16. public class HomeController : Controller
  17. {
  18. public ActionResult Index(string id)
  19. {
  20. return View();
  21. }
  22. }
  23.  
  24. @Url.Action("Index", "Home")
  25.  
  26. @UrlHelper.GenerateUrl(
  27. "Default",
  28. "index",
  29. "home",
  30. null,
  31. Url.RouteCollection,
  32. // That's the important part and it is where we kill the current RouteData
  33. new RequestContext(Html.ViewContext.HttpContext, new RouteData()),
  34. false
  35. )
Add Comment
Please, Sign In to add comment