September 7th, 2011, 10:10 PM
I want to create a mobile site, but...
I have a website in the making right now, and it is an ASP.NET-run website. That means I use a MasterPage.master for my layout.
On my website there are certain pages, called "individual pages" for certain local businesses that are often accessed through smartphones. I would like to change around the CSS of these "individual pages" to be more mobile-friendly, and ONLY these individual pages. I am a newbie when it comes to converting a desktop-layout to a mobile one, but I understand the simplest way to do it is by attaching a certain stylesheet like
<link rel="stylesheet" href="handheld.css" type="text/css" media="handheld" />
in the <head> </head> of every page I want to be mobile friendly. But, since all my stylesheets are connected to one single MasterPage file, I do not know how to implement mobile changes to only a portion of my website's pages...
So, how do I implement in an ASP.NET website particular stylesheets to particular webpages?
Thanks, I really appreciate it!
December 19th, 2011, 12:19 AM
ASP.NET 2.0 provides the same adaptive rendering as ASP.NET 1.x, although a browser's capabilities are determined by Browser Definition Files rather than a element. browserCaps support still exists in ASP.NET 2.0 for backwards compatibility, but has been deprecated and its use should therefore be avoided.) In addition to adaptive rendering, ASP.NET 2.0's rendering framework also can be configured using control adapters. A control adapter is an optional class that, if present and properly configured, is used to render the Web control instead of using the control's default rendering logic. In short, using control adapters you can take the core functionality of a Web control, but completely customize the markup emitted. This is useful if you want to modify the default rendering for all browsers or if there are particular user agents - certain cell phones or portable devices, perhaps - for which you need to provide a customized rendering.