//////////////////////////////////////// CODE ////////////////////////////////////////
protected void GetPlatform()
{
HttpBrowserCapabilities bc = HttpContext.Current.Request.Browser;
String Platform = bc.Platform;
String pt = "";
if (Request.UserAgent.IndexOf("Windows NT 5.1") > 0)
{
//xp
pt = "win XPath";
}
else if (Request.UserAgent.IndexOf("Windows NT 6.0") > 0)
{
//VISTA
pt = "win vista";
}
else if (Request.UserAgent.IndexOf("Windows NT 6.1") > 0)
{
//7
pt = "win 7";
}
////////////////////////////////////////////////////////////////////////////////////////
now you can print the string pt which print the name of browser.
--
/\/ir@\/ <(.'.)>
0 comments:
Post a Comment
Thanks for comment