how to detect ipad in asp.net using c#

in this web programming tutorial you will learn that how to detect ipad. this will help you to add some css or some other functionality to run ipad applications properly like ipad do not support flash movies and some other css properties in order to implement some alternates programming tricks to your ipad applications we need to detect ipad in our browser, below is the code
we just need to copy and past the code.

if (Request.Headers["User-Agent"].ToLower().Contains("ipad"))  
{  
     //iPad detects. Write your logic here which is specific to iPad.  
}  
else  
{  
     //Normal browsers [from computers] requested.  
}  
OR
view plainprint?
if(HttpContext.Current.Request.UserAgent.ToLower().Contains("ipad"))  
{  
     //iPad detects. Write your logic here which is specific to iPad.  
}  
else  
{  
     //Normal browsers [from computers] requested.  
}  
 

Admin

A Software Engineer, Social Media Marketing Expert, writer,

Post a Comment

Previous Post Next Post