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.
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.
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:
C# |
Copy Code
|
//[theComponent] is the name of an existing either Chart or Diagramming component
[theComponent].ServerSettings
|
Visual Basic |
Copy Code
|
'[theComponent] is the name of an existing either Chart or Diagramming component
[theComponent].ServerSettings
|
The NServerSettings object contains three properties:
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:
- 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.
- 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.