HtmlTable Property (.NET)

 

Type: string

 

This property returns a HTML string that when sent to the browser renders a complete pass/fail style table.  The table typically contains three columns - a brief description ("Browser check"), a status such as "Pass", and a message such as "Your browser type of Internet Explorer 7.0 is supported".  All output including the values, messages, and column names (and which columns to suppress, if any) are completely customizable, as is the entire look and feel of the table using CSS.

 

Foe example, the entire table below was created simply by defining rules in an XML file, including a CSS file in the page, and outputting the value of the HtmlProperty, without any custom programming needed to build the output table (which is completely dynamic and will vary from user to user based on their browser and system settings).

 

 

C# Example:

<%

RuleEngine engine = RuleEngine.GetFromFile("rules.xml"));

ExtendedOptions options = engine.GetExtendedOptions();

ExtendedBrowserObj extendedBrowObj = BrowserObj.GetExtendedBrowser(options);

BrowserObj browObj = BrowserObj.GetBrowser();

RuleEngineResult result = engine.GetResult(browObj, extendedBrowObj);

string htmlResultsTable = "";

if (result.Redirect != null)

   // The rules dictate that the user should be redirected

   // Response.Redirect(result.Redirect);

else

   htmlResultsTable = result.HtmlTable;

%>

... Above code can be done in Page_Load, then later ...

<html><body>

   HTML to appear before results table goes here

   <% Response.Write(htmlResultsTable); %>

   HTML to appear after results table goes here

</body></html>

 

Tip: See the numerous RET samples included with BrowserHawk (particularly the FancyPants demo site) and the Rules Enforcement Technology Users Guide (available separately) for more information.

 

Note: This property requires the Enterprise Edition of BrowserHawk

 

See Also:

About the RuleEngineResult Class

About the RuleEngine Class

About Rules Enforcement Technology (RET)