• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 536
  • Last Modified:

asp.net mvc web api - mobile views

Is it possible to use asp.net wep api and return two different views based on the device (mobile/desktop)?

Looking for some built in feature.
0
sudheer_k
Asked:
sudheer_k
  • 3
  • 2
1 Solution
 
Craig WagnerSoftware ArchitectCommented:
ASP.NET Web API doesn't return views, it returns data (XML, JSON, etc).

Did you mean ASP.NET MVC?
0
 
sudheer_kAuthor Commented:
Oh ya. That should work fine.
0
 
Eddie ShipmanAll-around developerCommented:
There was a great article in MSDN magazine about using ASP.Net4 to create mobile-optimized views using WURFL.

Part 1: http://msdn.microsoft.com/en-us/magazine/dn296507.aspx
Part 2: http://msdn.microsoft.com/en-us/magazine/dn342866.aspx

He had an earlier article on
"a server-side approach to take with ASP.NET MVC site development: to build ad hoc views for each class of supported devices (“Mobile Site Development: Markup http://msdn.microsoft.com/magazine/jj133814)"
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
sudheer_kAuthor Commented:
Thanks. This looks fair to me.
0
 
sudheer_kAuthor Commented:
Thanks. This is good.
0
 
Eddie ShipmanAll-around developerCommented:
Which did you end up using?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now