Nevron .NET Vision
Nevron.UI.WebForm.Controls Namespace / NBrowser Class / NoMatchExpression Property
Example


In This Topic
    NoMatchExpression Property
    In This Topic
    A .NET regular expression that must not match the browser HTTP User Agent header.
    Syntax
    'Declaration
     
    
    <System.Xml.Serialization.XmlAttributeAttribute()>
    <System.ComponentModel.DefaultValueAttribute("")>
    Public Property NoMatchExpression As System.String
    'Usage
     
    
    Dim instance As NBrowser
    Dim value As System.String
     
    instance.NoMatchExpression = value
     
    value = instance.NoMatchExpression
    [System.Xml.Serialization.XmlAttribute()]
    [System.ComponentModel.DefaultValue("")]
    public System.string NoMatchExpression {get; set;}
    Remarks
    If the NoMatchExpression contains an empty string no match is performed. For more information of working with regular expressions please refer to the .NET SDK documentation.
    Example
    The following example constructs a NBrowser object that evaluates to Netscape browsers 5.0 and above.
    Dim browser As NBrowser =  New NBrowser() 
    browser.MatchExpression = ".*Mozilla.*"
    browser.NoMatchExpression = ".*compatible.*" ' all other browser must have compatible.
    browser.FromMajorVersion = 5
    browser.FromMinorVersion = 0
                
    Dim respose As NResponse =  New NImageResponse() 
                
    Dim browserResponsePair As NBrowserResponsePair =  New NBrowserResponsePair() 
     
    browserResponsePair.Response = respose
    browserResponsePair.Browser = browser
    NChartControl1.ServerConfiguration.Responses.Add(browserResponsePair)
    NBrowser browser = new NBrowser();
    browser.MatchExpression = ".*Mozilla.*";
    browser.NoMatchExpression = ".*compatible.*"; // all other browser must have compatible.
    browser.FromMajorVersion = 5;
    browser.FromMinorVersion = 0;
                
    NResponse respose = new NImageResponse();
                
    NBrowserResponsePair browserResponsePair = new NBrowserResponsePair();
                
    browserResponsePair.Response = respose;
    browserResponsePair.Browser = browser;
    NChartControl1.ServerConfiguration.Responses.Add(browserResponsePair);
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also