Related Topics:
Setting a new landing page in ASP.NET Core MVC
Razor Pages Default Page in aspnetcore 2
In simplest way, I create a new Asp.net razor page project and Create a folder named 'Identity' and two Razor pages like this:
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