Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HomeController : Controller
- {
- public ActionResult Index(string id)
- {
- return View();
- }
- public ActionResult About(string id)
- {
- return View();
- }
- }
- @Url.Action("About", "Home")
- public class HomeController : Controller
- {
- public ActionResult Index(string id)
- {
- return View();
- }
- }
- @Url.Action("Index", "Home")
- @UrlHelper.GenerateUrl(
- "Default",
- "index",
- "home",
- null,
- Url.RouteCollection,
- // That's the important part and it is where we kill the current RouteData
- new RequestContext(Html.ViewContext.HttpContext, new RouteData()),
- false
- )
Add Comment
Please, Sign In to add comment