Redirect Property (.NET)

 

Type: string

 

This property returns the redirect URL, or null if none.  The redirect URL is determined by the first redirect command in the rules file that matches. For example if you have a rule defined to redirect the user based on a certain test condition, and that condition results in a match, then this property contains the URL to redirect the user too. Not all rules files have rules with redirect actions, in which case this property will always be null.

 

C# Example:

<%

...

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

if (result.Redirect != null)

   // The rules dictate that the user should be redirected

   Response.Redirect(result.Redirect);

}

%>

 

Tip: For best results the check shown above should be performed prior to any HTML being output to the browser. A great place for this in ASP.NET pages is the Page_Load event.

 

Tip: See the numerous RET samples included with BrowserHawk 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)