ProgrammerGuide.Net | Step by Step Programmer Guide

How to Override the Common Route Prefix? | ASP.Net MVC Interview Question

  • You can use a tilde (~) on the method attribute to override the route prefix
  • Well,It’s like this : [Route(“~/PetBooking”)]

    public class BookingController : Controller
        // eg: /PetBooking
        public ActionResult PetBooking() { return View(); }

Above Route on Browser is as below

Please click here for related products on Amazon!


Add comment

Want to Check Celebrities News?