Gets or sets the string that will be used as the boundary between files (including the -- prefix), when encoding this element as multipart/form-data.
Namespace: Facilita.WebAssembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.7.98 (1.0.0.0)
Syntax
Field Value
The string that will be used as the boundary between files (including the -- prefix), when encoding this element as multipart/form-data.Examples
// Populate form with data Form form = previousResponse.ExtractForm("myForm"); form.GetInputElement("input1").Value = "value1"; form.GetFileElement("files-to-upload[]").AddFile("image.bmp", @"C:\dataFiles\image.bmp", "image/bmp"); form.GetFileElement("files-to-upload[]").AddFile("image2.bmp", @"C:\dataFiles\image2.bmp", "image/bmp"); // Set the multipart boundary for the FileElement form.GetFileElement("files-to-upload[]").MultipartBoundary = "--multipart-file-boundary"; // Send the POST request Request request = WebBrowser.CreateRequest(HttpMethod.POST, myUrl); request.SetMessageBody(form); Response response = request.Send();
Examples
--multipart-form-boundary Content-Disposition: form-data; name="input1" value1 --multipart-form-boundary Content-Disposition: form-data; name="files-to-upload[]" Content-Type: multipart/mixed; boundary=multipart-file-boundary
--multipart-file-boundary Content-Disposition: file; filename="image.bmp" Content-Type: image/bmp (binary image data)
--multipart-file-boundary Content-Disposition: file; filename="image2.bmp" Content-Type: image/bmp (binary image data)
--multipart-file-boundary-- --multipart-form-boundary--
Examples
form.GetFileElement("files-to-upload[]").MultipartBoundary; // This will return "--multipart-file-boundary"
See Also