But i see Site.Mobile.Master also. Do I have to maintain saperate forms for one for each desktop and mobile or is there any way so the desktop form can be used for mobile also.
But i see Site.Mobile.Master also. Do I have to maintain saperate forms for one for each desktop and mobile or is there any way so the desktop form can be used for mobile also.
The mobile layer is used when a mobile device is detected. This is handled by the Friendly Urls API in web forms. It can be disabled.
Web Forms is a pretty old framework. You're looking back in time. This is how the mobile application layouts were handled several years ago in Web Forms.
The actual display is up to you. I assume you are using Bootstrap. Read the Bootstrap docs to learn how to write a the markup to work on all devices.
two master pages was old school, and does not work well (the code to detect browser type is not maintained and several years out of date). the most common approach is to use responsive design and a responsive framework like bootstrap
None
0 Points
6 Posts
In VS in Asp.net do we have to maintain 2 forms one for Desktop and one for Mobile.
Jan 27, 2021 03:48 PM|JuzerHussain|LINK
I have developed website for desktop.
I used Site.Master as master page.
But i see Site.Mobile.Master also. Do I have to maintain saperate forms for one for each desktop and mobile or is there any way so the desktop form can be used for mobile also.
Pls inform
Thanks
JH
All-Star
53041 Points
23612 Posts
Re: In VS in Asp.net do we have to maintain 2 forms one for Desktop and one for Mobile.
Jan 27, 2021 04:47 PM|mgebhard|LINK
The mobile layer is used when a mobile device is detected. This is handled by the Friendly Urls API in web forms. It can be disabled.
https://forums.asp.net/t/2138112.aspx?Disable+the+site+mobile+master
https://www.hanselman.com/blog/introducing-aspnet-friendlyurls-cleaner-urls-easier-routing-and-mobile-views-for-aspnet-web-forms
https://docs.microsoft.com/en-us/previous-versions/aspnet/jj879443(v=vs.111)
Web Forms is a pretty old framework. You're looking back in time. This is how the mobile application layouts were handled several years ago in Web Forms.
The actual display is up to you. I assume you are using Bootstrap. Read the Bootstrap docs to learn how to write a the markup to work on all devices.
All-Star
58194 Points
15655 Posts
Re: In VS in Asp.net do we have to maintain 2 forms one for Desktop and one for Mobile.
Jan 27, 2021 08:16 PM|bruce (sqlwork.com)|LINK
two master pages was old school, and does not work well (the code to detect browser type is not maintained and several years out of date). the most common approach is to use responsive design and a responsive framework like bootstrap
None
0 Points
6 Posts
Re: In VS in Asp.net do we have to maintain 2 forms one for Desktop and one for Mobile.
Jan 28, 2021 06:04 AM|JuzerHussain|LINK
Hi mgebhard , bruce
Thank you both for your reply.
I am using bootstrap.
As per your feedback, I assume just one form with bootstrap will be enough for all devices, no need to use Site.Mobile.Master page.
JH