Episode

[How Do I:] Detect Browser Capabilities in ASP.NET Web Pages

In this video Chris Pels will show how to determine what capabilities a user’s browser has when viewing pages in an ASP.NET web site. First, learn how to access an instance of the HttpBrowserCapabilities object from the ASP.NET Request object associated with the web page request. Next, see the different information available in the HttpBrowserCapabilities object such as the type of browser and whether the user’s browser supports JavaScript and Cookies. Then see an example of how to user this information about the user’s browser and determine if a crawler is accessing the web site so it can be redirected to a crawler specific web page.

  • Source (C#)
  • Source (VB)