What is the preferred method of device-specific rendering in .net websites?

Posted by alimac83 on Stack Overflow See other posts from Stack Overflow or by alimac83
Published on 2012-03-20T11:13:25Z Indexed on 2012/03/20 11:30 UTC
Read the original article Hit count: 184

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about android

Related posts about .NET