Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. routes.MapMvcAttributeRoutes(); //Enables Attribute Routing
  2.  
  3. routes.MapPageRoute("WebFormDefault", "", "~/Default.aspx");
  4.  
  5. routes.MapRoute(
  6. name: "MvcDefault",
  7. url: "{controller}/{action}/{id}",
  8. defaults: new { action = "Index", id = UrlParameter.Optional }
  9. );
  10.  
  11. [HttpGet]
  12. [ValidateInput(false)]
  13. [Route("Summary/{id}", Name="GetSummary")]
  14. public ActionResult GetSummary(int id)
  15. {
  16. // blah blah blah
  17. return PartialView("_CardViewPartial", summaries);
  18. }
  19.  
  20. @model Models.DoorIndexPageModel
  21. @{
  22. Layout = "~/Views/Shared/_MVCPartialLayout.cshtml";
  23. }
  24.  
  25. @Html.Action("GetSummary", new {Model.DisplayEmpId})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement