Reputation: 504
We are building a ASP.NET Core 3.1 Razor web application using .NET Core 3.1 as framework , C# as programming language and Razor pages. The web application has also to be comptaible with mobile devices.
We are new to Razor pages.
We started with creating a basic Razor pages ASP.NET Core web application. We created a login page as the start page.
For making the login page work also in mobile devices, we made changes as per this tutorial : Rendering ASP.NET Web Pages (Razor) Sites for Mobile Devices
We created a version of Pages\Login.cshml
with some UI changes and renamed it as Pages\Login.Mobile.cshtml
. We also
But at run time, Pages\Login.Mobile.cshtml
is not called when a mobile device requests Pages\Login.cshtml
.
Question: Why .Mobile.cshtml is not rendered in ASP.NET Core C# Razor Pages Web application?
Upvotes: 0
Views: 1093
Reputation: 4975
That documentation describes a feature of an old version of ASP.NET, namely ASP.NET Web Pages (versions 2.0 to 3.5). This feature was deprecated in ASP.NET 4.
You're using ASP.NET Core 3.1? Core came out after ASP.NET 4, so you can't use that feature anymore.
Upvotes: 1