What is the preferred method of device-specific rendering in .net websites?
- by alimac83
I'm working on a website using webforms (although I'd be keen to hear how this works with MVC) and I'm trying to figure out the best approach for rendering content for mobile devices.
Usually when I'm working on sites that have to be viewed on mobile devices, I use media queries to style the content differently. The problem is that in my current scenario I'm trying to display different content altogether, rather than just changing the layout of existing content.
What's the preferred approach for this? I've had a look at 'device specific rendering' on msdn (http://msdn.microsoft.com/en-us/library/hkx121s4.aspx) although I'm not sure if this is a good approach? What are the pros/cons/alternatives?
Thank you
EDIT: I've found this but it's for use with mvc4, not webforms.
EDIT #2: I think I've found what I'm after here but is this a good approach?