AddProperties Method (.NET)



 extOptions.AddProperties(string propertiesToAdd);



The AddProperties method is used to instruct BrowserHawk on which extended properties you want tested when the GetExtendedBrowser method is called. Since there are dozens of extended property tests, it is important that you indicate in advance which tests you want performed. For example, if you only want to test for Flash and connection speed, BrowserHawk needs to know this.


The propertiesToAdd parameter must contain one or more names of properties contained in the ExtendedBrowserObj class. Multiple names must be separated by a comma. You can also pass in "all" as a keyword, which sets just about all of the extended properties to be tested with the exception of the more aggressive tests, such as connection speed.


If you prefer, you can also pass in constants from the ExtendedBrowserObj class as Int64 values instead.


C# Example 1 – Use of property names as strings:


ExtendedOptions options = new ExtendedOptions();


ExtendedBrowserObj extBrow = BrowserObj.GetExtendedBrowser(options);



JavaScriptEnabled: <% Response.Write(extBrow.JavaScriptEnabled); %>



See Also:

PropertiesLong Property