Open Closed

Default Page related Issue #3043


User avatar
0
kapil created

If i want to show other razor page as default page instead of index.cshtml then what should i do?

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    There is a couple of ways to achieve that.

    • You can create a controller that redirects like below https://github.com/abpframework/abp/blob/dev/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Controllers/HomeController.cs#L10

    • You can create a new page that handles the"/" path by beginning with @page "/" .

      You can check this out: https://docs.microsoft.com/en-us/aspnet/core/razor-pages/razor-pages-conventions?view=aspnetcore-6.0


    • AspNetCore default routing pattern is {controller=Home}/{action=Index}/{id?}. You can change that pattern via configuring routing. Check this out: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-6.0#route-templates
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.