I have a webpage or mvc view, i want to show data accroding to mobile device or web page. some information will be for mobile users and some information for laptop/users.
Below are few lines that will detect device mobile .
public static bool IsMobileDevice()
{
var myBrowserCaps = System.Web.HttpContext.Current.Request.Browser;