Related Topics:
and change Route for TaskSelection
page like this:
Now I want to change first landing page of this web project and I don't want to:
Delete index page
Redirect from index page when
Get
method called
I wrote this code in ConfigureServices
:
services.AddMvc().AddRazorPagesOptions(options =>
{
options.Conventions.AddPageRoute("/Identity/TaskSelecttion", "/Identity/TaskSelecttion");
});
but it returns to index page!!!.
How can I change default landing page from index to TaskSelection
page?
Thanks
CodePudding user response:
I changed the options
like this:
services.AddMvc().AddRazorPagesOptions(options =>
{
options.Conventions.AddPageRoute("/Identity/TaskSelection", "");
});
but I got this error:
AmbiguousMatchException: The request matched multiple endpoints. Matches: /Identity/TaskSelection /Index
so I change the routing for index page like this:
and it worked