ASP.NET MVC 4 - How to Create Mobile and Desktop Versions of a Website - Part 1

ASP.NET MVC 4 - How to Create Mobile and Desktop Versions of a Website - Part 1


This video walks you through how to create both a Mobile and a Desktop version of a Website using ASP.NET MVC 4 using built in MVC 4 features that make it easy to do so.

Source Code: http://www.digioz.com/downloads/tutor...
Website: http://www.digioz.com
Closed Caption:

this tutorial I will walk you through
how to create a website in mvc4 that
supports both regular desktop version
and a mobile version to begin i will
create a new project a new NBC for
project and i will call this the mobile
site test a basic layout of fines
ok so let's start by adding a few things
here
so I'm going to act two new folders one
of them i'll call desktop and the other
1i will call mobiles and inside of the
desktop folder i don't have a CSS folder
and i will have an images folder and the
same with the mobile versions will have
a CSS and images
ok so here I start by adding a
stylesheet
ok start with a text so we will call
this
and let's call this style that CSS
and and here I've got a style that I've
prepared a stylesheet
I'm just going to copy and paste that
over
it doesn't matter how your design looks
it really is just a matter of having any
style so next I'm going to copy some
images in
and i will copy those from a different
folder
so these are all my images and I had a
man and that's pretty much all my
desktop stuff so next is the mobile
version again going to add my style
sheet and inside of here after the
different template
and
here is so i got my stylesheet now and
I'm going to do the same with the images
from my mobile style so and existing
item images just two of them
which we have not great so now that I
have all my apps images in style sheets
I'm ready to add a line of code to my
global deus ex
okay here right after the area
registration register all areas and the
application start method of the
global.asax starts ES File i'm going to
type display modes equals to this play
mold provider and we will need to add a
reference
using web . webpages reference that
instance that malts
so what this does is enables the .
mobile view extension which we will use
to build our mobile application so
next india view view shared i'm going to
copy my layout
and paste it and rename it to the same
thing that underscore layout that my
wall that CSS HTML so what this will
give us is it will give us a secondary
layout called just which is called just
for the mobile version of our
applications and then of course I've got
the regular version which is this one
here so the next thing I'm going to do
is I'm going to change this bundle here
by going to the bundle configuration
file and I'm going to call it something
else i'm going to call it
CSS desktop and point to my content
desktop CSS site that CSS
and I will also add a new bundle and
college CSS mall and here i will replace
it with mobiles and again they will go .
to mobile CSS style
which we already created save that
alright so starting with the regular
layout let's bring in our style from our
template
on the regular layout so here I'm going
to first change the doctype because my
style requires it
and here
my HTML has an attribute
and
rest of it i'm just want to pretty much
copy in here
yes
and this is a free template that i
downloaded I did not write this template
so all right so that part of it is fine
our style sheet now is called CSS
desktop
alright so that lets see next we're
going to put the actual contents under
body
and to do that i will have to go to the
controllers and create a controller i
will call this home
empty MVC control is mine
and here i will add a view index is fine
again
this is where all our content is gonna
go and I will immediately notice that
there's now a view views home directory
with an index study CSS HTML and yet so
i'm going to copy this guy and paste it
in here and call this one and X top
mobile that CSS HTML and that's going to
be our mobile version so first our
regular versions
I have some content prepared here which
is which i'm just going to copy
there we are
ok and that should really be it the last
thing I should double check is to make
sure there aren't any images
to start okay so we're good now let's
run this guy and see how it looks
ok so let's run this thing see if we got
our desired outcome but it looks like we
didn't it looks like none of our style
came in the way it's supposed to
so in the interest of timeless just
paste the direct link in here to the
style sheet and forget about bundles for
seconds
and run it against ok so it works and
again I don't approve of this style in
any shape or form this I chose it
because it is so extreme in terms of
contrast with the mobile version that it
really helps me make the point here so
our regular the desktop version of our
site works so let's not work on the
mobile layout
so our mobile layout is pretty similar
and so we're going to do something
similar here
here's the doctype HTML mouth
tag
hermetic
also are you poor tech
okay we'll leave the title as it is here
again I'm just gonna do away with the
bonds for
the sake of simplicity and uh just going
to put in here till the content and
mobile CSS style which is what we want
and that's really all the changes i have
to make to the layout
now in the home
view of my homepage i'm going to copy
and paste our mobile versions and and
again i did not create this mobile style
this is something that I grabbed from
the web and here's my mobile version now
to test our mobile version however well
first let's run our regular version
make sure our regular version works
stone
ok so now i'm going to run an emulator
and this is called electric mobile
studio on it's no longer free but it's a
an easy way to test your mobile version
of your website on a windows machine so
launch new instance of an iphone and
then i'm going to copy and paste the
link that I had here and the
browser hopefully fucking get it up haha
looks like we're pretty close here with
our mobile versions
so for the image in the top so let's .
this guy to the right place
dot slash do
alright let's . to kill the content
m images
yeah just right this way
there we go alright so here's our mobile
version it again it
looks nothing like a regular desktop
version so if i were to put this site by
site here with our regular version
they look not nothing like each other
and that's basically the point they
don't have to look like each other but
with a few simple changes we basically
now support both mobile version and a
desktop version of our website i hope
you found this tutorial useful please
subscribe and leave comments or
questions if you have and stay tuned for
part 2

Video Length: 17:41
Uploaded By: DigiOz Multimedia
View Count: 38,588

Related Software Products
MVC Video To Mobile
MVC Video To Mobile

Published By:
mobilevideoconvertion.com

Description:
Video to Mobile converter. Converts video to mobile formats (3gp, mp4) iPod, iPhone, PSP. Fast conversion speed, user-friendly interface. Free 14-days trial version. BRBRKey features:BRBRWorkes with Windows Vista.BRGreat video compression ratio.BRUltra fast conversion speed.BRSupport almost all popular video formats for input.BRGreat picture and sound quality.BRConverts video to mp4 format.BRConverts video to 3gp format.


Related Videos
JQuery Mobile, Backbone, and ASP.NET MVC - A Framework for Making Mobile Web Applications
JQuery Mobile, Backbone, and ASP.NET MVC - A Framework for Making Mobile Web Applications

The code is at: https://github.com/Rockncoder/JQMContacts The slides are at: http://www.slideshare.net/rockncoder/jquery-mobile-backbone-and-aspnet-mvc Websites designed for smart phones are one of the fastest growing segments of the internet. JQuery Mobile makes it easy to create sites for mobile devices, but it is mostly about UI. It doesn't address the needs of an enterprise application. Things like how to load data from and persist data to the ...
Video Length: 59:59
Uploaded By: Troy Miles
View Count: 7,050

Building Mobile Friendly Websites with MVC 4 (The easy way)
Building Mobile Friendly Websites with MVC 4 (The easy way)

Check out our other videos http://vid.io/xqZ9 Subscribe to c0deporn http://vid.io/xqZ4 Building mobile friendly web sites or making an existing mobile friendly website is not easy. There are a few ways of doing it and they each have pro's and con's. In this video, I take you through setting up the mechanics to support multiple devices and how to arrange your content to fit. We'll cover: - Different strategies for managing mobile & desktop content views br ...
Video Length: 25:14
Uploaded By: c0deporn
View Count: 5,368

MVC 4.0 tutorial: UI Design and Mobile Development
MVC 4.0 tutorial: UI Design and Mobile Development

Sample video for our MVC 4.0 tutorial: UI Design and Mobile Development with Expert Instructor -- James Curtis. Get full course details @ http://bit.ly/13fLt5h The MVC 4 framework has a lot of tools that makes web development powerful. In this course you will learn how to use JavaScript, jQuery UI and Partial Views to enhance MVC 4 Web Applications. Then you will continue use JavaScript with jQuery Mobile to detect mobile browsers in a MVC 4 web application. hr ...
Video Length: 13:56
Uploaded By: LearnNowOnline
View Count: 3,367

[Shot on version 2013.1] Using Mobile Designer for MVC in Your Projects
[Shot on version 2013.1] Using Mobile Designer for MVC in Your Projects

The video shows how to use our new report designer for MVC in projects. It starts from creating a new project, shows basics of working with Visual Studio, and ends with opening the Mobile Designer for MVC in the web browser. http://www.stimulsoft.com
Video Length: 02:55
Uploaded By: Stimulsoft
View Count: 298

[Shot on version 2013.1] Saving Report in Mobile Designer for MVC
[Shot on version 2013.1] Saving Report in Mobile Designer for MVC

This video shows the basics of creating a report in our Mobile Designer for MVC. http://www.stimulsoft.com
Video Length: 01:32
Uploaded By: Stimulsoft
View Count: 216

MVC promotion video
MVC promotion video

As a start-up, clk2c looked at most cost effective ways to promote the radically new concept of Mobile Video Communication (MVC). This promotional video was shot right in our office, using a home camcorder and laptop for voice recording. The laptop was strategically placed to hide the mike! Right from conceptualization, scripting and final shooting, all execution was done internally. The video was then promoted to the brand managers as a MVC which they could access right on their mobile. Clk2c ...
Video Length: 01:33
Uploaded By: Suresh Kabra
View Count: 58

Copyright © 2025, Ivertech. All rights reserved.