WeOnlyDo! wodWebServer ActiveX - Add Method
      
 

Description

Adds new header to the collection.


Return Type

A WebHeader object.  


Syntax

object.Add (Name, [Value])



The Add Method syntax has these parts:

Part Description
object An expression evaluating to an object of type WebHeaders.
Name Required. A String value. Holds header name.
Value Optional. A Variant value. Holds header value.

Remarks

Add method will add new header to the collection of all headers, usually for Response object (Request is populated by the client). To add new header, you can use code like this:

User.Response.Headers.Add "Content-Type", "text/html"

or even easier

User.Response.Headers("Content-Type") = "text/html" ' (only available in some environments, such as VB)

Add method will return reference to create WebHeader object, which can be ignored.