Nevron .NET Vision
Framework / Web Forms / Response Types / Response Types and Browser Detection

In This Topic
    Response Types and Browser Detection
    In This Topic
    This topic applies only for non-AJAX modes.

    Before we start to elaborate on the features available in each of the response types you must get familiar with our components for .NET server configuration. 

     Response objects

    Each response type is represented by an object derived from NResponse . These are:


    • NImageResponse - represents an image response send to the browsers directly or through an HTML img or embed tag.
    • NHtmlImageMapResponse - represents a standard HTML image map and allows you to modify some properties like the script used to encode the image map.
     The server configuration object

    Nevron Components for .NET have an associated object called NServerSettings which contains all the information related to the server settings and browser response available to the control. This object can be accessed from the ServerSettings property:

    Copy Code
    //[theComponent] is the name of an existing either Chart or Diagramming component
    Visual Basic
    Copy Code
    '[theComponent] is the name of an existing either Chart or Diagramming component

    The NServerSettings object contains three properties:


     Determining the response type

    Now lets take a closer look at how the component determines the response type to generate. When a component receives an HTTP request it follows a procedure to determine the response type depending on the browser accessing the page:


    1. The component iterates through the BrowserResponsePairs collection of the NBrowserResponseSettings object in ascending order and tries to match the browser accessing the page with the description of the browser contained in the NBrowserResponsePair.Browser object. If there is a successful match the response type contained in the NBrowserResponsePair.Response will be generated.
    2. If the control cannot find a match then it generates the default response accessible via the DefaultResponse property of the NBrowserResponseSettings object.


    The code examples in the next topics will modify the default response for simplicity. For more information on browser detection refer to the Browser Detection  topic.

    See Also