Adds the indicated header.
[Visual Basic] Overloads Public Sub Add( _ ByVal header As String _ ) [C#] public void Add( string header ); [C++] public: void Add( String* header ); [JScript] public function Add( header : String );
Exception Type | Condition |
---|---|
ArgumentException | The header does not contain a colon (:) character
-or- The header is a restricted header that should be set with a property. |
The header value should be specified in the format Header: value
.
If the header specified in header is already present, value is concatenated with the existing value.
WebHeaders Class | WebHeaders Members | System.Net Namespace | WebHeaders.Add Overload List