Search code examples
c#asp.net-mvc-5routes

I want my page to open in 2 routes. what should I do


I want my page to open in 2 routes. what should I do.

enter image description here


Solution

  • You can specify two different routes in same attribute,

    Something like

        [Route("{title}-Q{id}"), Route("{title}-S{id}"), HttpGet]
        public IHttpActionResult QuestionDetail(string title, string id)
        {
            //Your business logic
    
        }