OSName Property (.NET)

Type: String

OSName returns the operating system installed on a visitor's machine. Possible return values include "WinXP", "Win2000", "Windows Server 2003", "WinME", "WinCE", "Windows Vista", "MacOSX", "Linux", "SunOS", and "IRIX64".

 

Special notes for this property:

 

Note: Use of this property requires the Enterprise Edition of BrowserHawk.

 

C# Example:

<%

ExtendedOptions options = new ExtendedOptions();

options.AddProperties("OSName");

ExtendedBrowserObj extBrow = BrowserObj.GetExtendedBrowser(options);

%>

<html>OSName is:

<% if (extBrow.OSName == "-1" || extBrow.OSName == "-2") {

// fall back to Platform property

BrowserObj browObj = BrowserObj.GetBrowser();

Response.Write(browObj.Platform);

} else {

Response.Write(extBrow.OSName);

} %>

</html>

 

See Also:

Additional Steps Required for Java based properties

OSArch Property (.NET)

OSVersion Property (.NET)

Platform Property (.NET)

Detecting Operating System Details