BrowserHawk serves as a powerful replacement for the default HTTPBrowserCapabilities in the .NET framework. In addition to its far greater accuracy and auto-updating of its database, BrowserHawk provides many additional benefits, including detection of disabled settings, plug-ins, connection speed, screen sizes, Java information, unique browser statistics and much more than the HTTPBrowserCapabilities offers.
The native .NET version of BrowserHawk is recommended for use with ASP.NET or any .NET programming environment.
This example demonstrates how to use the BrowserHawk .NET component from an ASP.NET page:
Using the native .NET component from ASP.NET (C#):
<%@ Page language="c#" %>
<%@ Import Namespace="cyScape.BrowserHawk" %>
<%
BrowserObj bhObj = BrowserObj.GetBrowser();
if (bhObj.Frames == False)
Response.Redirect("/noframes_site.asp");
%>
<HTML> ... load frameset here ... </HTML>
Using the native .NET component from ASP.NET (VB.NET):
<%@ Page language="vb" %>
<%@ Import Namespace="cyScape.BrowserHawk" %>
<%
dim bhObj as BrowserObj = BrowserObj.GetBrowser()
if bhObj.Frames = False then
Response.Redirect("/noframes_site.asp")
%>
<HTML> ... load frameset here ... </HTML>
For additional code snippets that demonstrate how to use the native .NET version of BrowserHawk from ASP.NET pages, see any of the properties in the .NET Property Reference Guide, such as Browser, Platform, JavaScriptEnabled, and Plugin_Flash.