Asp.net - Latest Posts

Though it’s super simple, I couldn’t find anything online to easily figure out our Azure usage.

Scott Gu’s blog post from a month+ ago comes through though:

http://weblogs.asp.net/scottgu/archive/2012/01/19/getting-started-with-windows-azure.aspx

For me, I clicked on my account and saw my free trial but didn’t think to click again on the trial membership to see the details:

https://account.windowsazure.com/Subscriptions

image

After clicking again, I finally could see the usage.

image

Javascript

// Android, iPhone
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) ||
   (navigator.userAgent.match(/iPad/i))|| (navigator.userAgent.match(/Android/i))) {
   if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://m.espn.go.com/wireless/?iphone&i=COMR";
}

Asp.net

if(HttpContext.Current.Request.UserAgent.ToLower().Contains("ipad") ||
HttpContext.Current.Request.UserAgent.ToLower().Contains("iphone") ||
HttpContext.Current.Request.UserAgent.ToLower().Contains("android") ||
HttpContext.Current.Request.UserAgent.ToLower().Contains("ipod")
)
{
     //iPad is the requested client. Write logic here which is specific to iPad.
}
else
{
     //Normal browsers [from computers] requested.
}