Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //View
- DateTime raceDate = DateTime.Today;
- <center><a href="@Url.Action("EventInfo", new {raceDate= date, trackID=trID})" class="buttonize" target="_blank">View</a></center>
- //Controller
- public ActionResult EventInfo(DateTime raceDate, int trackID )
- {
- EventInfomodel = new EventInfo();
- model.MyRace = db.GetRaceDetails(raceDate, trackID)
- return View(model);
- }
- //Route.Config
- routes.MapRoute("Home/EventInfo", "Home/EventInfo/{raceDate}/{trackID}", new { controller = "Home", action = "EventInfo", raceDate = UrlParameter.Optional, trackID= UrlParameter.Optional });
- Home/EventInfo/04/22/2019%2000%3a00%3a00/59
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement