Try our conversational search powered by Generative AI!

Custom routes


I am trying to creata a custom route which will accept this action

        public async Task Index(ReportPage currentPage, string id)
            /* Implementation of action. You can create your own view model class that you pass to the view or
             * you can pass the page type for simpler templates */

            // todo: check if the report id is valid

            Report report = await // get report

            var model = new ReportPageViewModel(currentPage, report);
            return View(model);

I have added this route

             name: "Epi",
             url: "{language}/{node}/{action}/{id}",
             defaults: new { controller = "ReportPage", action = "Index", id = UrlParameter.Optional }

But I get this error

Page could not be loaded

The link you specified does not work. This may either be the result of temporary maintenance or an incorrect link.

Jan 03, 2018 14:37

What is the URL you are using in the failing request?

Jan 09, 2018 23:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.