Last post Oct 29, 2016 04:49 AM by JEREMER
Oct 26, 2016 10:17 PM|JEREMER|LINK
I have been working on a desktop version of a real estate site for a friend of mine but before I get too far into it I want to decide the best way to make a mobile version. I know that I could just make a duplicate site and make images, smaller, etc. to
accommodate the mobile screen, but I wanted to get another opinion. Is there a better way to port the already existing content to mobile, that I am not aware of?
I tried making relatively flexible code-behind files, so I could theoretically reuse them for mobile, but the problem still remains with the images being too large and items not being arranged correctly. I thought that I could make a new "mobile" Master Page
and new .ASPX files, but I don't know how much time that really saves me. Does anyone know of a "good" way to do this?
Please help - Thanks
Oct 27, 2016 07:53 AM|Mikesdotnetting|LINK
You can use "responsive design" to make one site which adapts to fit the screen it is being viewed on. The easiest way to do this is the use a UI framework like Bootstrap that is responsive by default. That way you only have one site to maintain.
Oct 27, 2016 03:17 PM|JEREMER|LINK
Thank you for the information. I do understand this concept, and I appreciate Wikipedia's "content is like water" analogy. However, my question is a bit more specific, meaning that I am curious "exactly" how other people handle mobile/desktop switching when
tags, Master Pages and/or programatically change the page arrangements in the code-behind file?
I can't really think of too many other options for handle switching between desktop and mobile layouts and content but ANY "specific" input would be helpful. I can obviously do this many different ways of my own choosing, including having duplicate pages and
manually updating content, but I would prefer not to do that. My initial thought is to tackle this with Master pages and switching between ASPX files with code-behind programming, but I wanted to get another opinion.
How do others handle this?
Oct 27, 2016 08:22 PM|Mikesdotnetting|LINK
I am curious "exactly" how other people handle mobile/desktop switching when using ASP.NET.
With these frameworks, you use CSS to determine how content reflows when the width of the screen decreases. You can even choose to omit content by setting its display property to none, or restyle it for different width devices.
Switching master pages based on the results of browser sniffing is not the recommended way any more. Browser detection technology is growing increasingly unreliable because of the proliferation of user agents these days.
Oct 29, 2016 04:49 AM|JEREMER|LINK
I know that you mentioned "responsive design", and thank you for the help. I am not looking for just the answer, but I was looking for a bit more of a literal answer to get a better idea of how this is actually done without using some sort of an API or plug-in
of sorts. So, I looked around a bit more and found a pretty good site that gives "simple" examples of how to do this with basic CSS. Here are a few links for anyone else who is interested:
Responsive Design Grid System
Responsive Design Grid Example