Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 526
  • 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
 
EddieShipmanCommented:
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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
sudheer_kAuthor Commented:
Thanks. This looks fair to me.
0
 
sudheer_kAuthor Commented:
Thanks. This is good.
0
 
EddieShipmanCommented:
Which did you end up using?
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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