Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Can you include mobile web pages in asp.net web site?


Asked by Kyson Potts on Nov 29, 2021 Web Services



You can include mobile Web pages in any ASP.NET Web site alongside ASP.NET Web pages. In Visual Studio, you can work with the adaptive rendering, customization, and extensibility features of ASP.NET mobile controls, using the standard IDE design tools: the page designer, the Toolbox, the debugger, Source view, Design view, and more.".
Thereof,
The simplest way to create device-specific page in an ASP.NET Web Pages site is by using a file-naming pattern like this: FileName.Mobile.cshtml. You can create two versions of a page (for example, one named MyFile.cshtml and one named MyFile.Mobile.cshtml ).
Moreover, Web Pages is one of many programming models for creating ASP.NET web sites and web applications. In addition, Web Pages applications are easily extendable with programmable helpers for databases, videos, graphics, social networking and more. If you are new to ASP.NET, Web Pages is a perfect place to start.
And,
Assuming you already have a Web Forms application designed for desktop browsers, the easiest way to proceed is to create a subfolder called "Mobile" within your project, and build your mobile pages there. You can construct an entire sub-site, with its own master pages, style sheets, and pages,...
In this manner,
MVC’s mobile web site support actually enables device specific targeting of views as well. In addition to .Mobile.cshtml, we could have .Iphone.cshtml and .WP8.cshtml etc. targeting specific devices. However differentiation of devices is left to the user and it is plugged in as follows: