SetHTTPFormField()

Description

Sets a text field in the web form which will be sent to the server with the images. You can set multiple fields by calling this method mutliple times.

Syntax

.SetHTTPFormField(fieldName, fieldValue);

Parameters

<string> fieldName: specifies the name of the field which can later be used on the server to retrieve the field value.
string fieldValue: specifies the field value.

Return value

bool

true indicates success. false indicates failure.

When false is returned, check ErrorCode or ErrorString for error information.

See also

ClearAllHTTPFormField()

Example

JavaScript:

DWObject.ClearAllHTTPFormField();
DWObject.SetHTTPFormField("PDFFileName", "test.pdf");
/* Get action page path */
var CurrentPathName = unescape(location.pathname); 
var CurrentPath = CurrentPathName.substring(0, CurrentPathName.lastIndexOf(";") + 1);
var strActionPage = CurrentPath + "SaveToFile.aspx";
DWObject.HTTPUploadAllThroughPostAsMultiPageTIFF(
  "www.dynamsoft.com",
  strActionPage,
  "test.tiff"
);

Action Page Part

System.Web.HttpContext.Current.Request.Form["PDFFileName"];