Back to product page

Add method


Adds new header to the collection.

Type

Integer. The position into which the new element was inserted.

Syntax

  • C#
  • VB.NET
Int32 Add(WebHeader Item);
The Add(Item) syntax has these parts:
ItemWeOnlyDo.Server.WebHeader object. Header object to add to the collection.

Int32 Add(String Name, String Value);
The Add(Name,Value) syntax has these parts:
NameString. Name of the header.
ValueString. Value of the header.

Function Add(ByVal Item As WebHeader) As Int32
The Add(Item) syntax has these parts:
ItemWeOnlyDo.Server.WebHeader object. Header object to add to the collection.

Function Add(ByVal Name As String, ByVal Value As String) As Int32
The Add(Name,Value) syntax has these parts:
NameString. Name of the header.
ValueString. Value of the header.

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")
 


Platforms

Windows