Gets a collection of form variables.
Namespace:
EasyAlgo.EAUploadAssembly: EasyAlgo.EAUpload (in EasyAlgo.EAUpload.dll)
Version: 1.3.0.0
Syntax
| C# |
|---|
public Form FormElements { get; } |
| Visual Basic (Declaration) |
|---|
Public ReadOnly Property FormElements As Form |
Field Value
Type: EasyAlgo.EAUpload..::.FormThe instance of Form class that represents a collection of form variables.
Remarks
You can use this property to geting an access to form field on the Uploading stage of an upload process.
Note:
If you trying to get form variables of the processing request then collection will contain processed form fields only.
Examples
The following code example shows how to get a posted form field value.
CopyC#
CopyVB.NET
// fileupload.aspx.cs ... Upload _CurrentUpload = UploadsManager.GetUpload(); // Get the value of UserComments form field. string _UserComments = _CurrentUpload.Form["UserComments"]; UploadedFileCollection _UploadedFiles = _CurrentUpload.UploadedFiles; // Get the UploadedFile object by form field name UploadedFile _File = _UploadedFiles["File1"]; string _FileName = _File.ClientFileName; ... ____________________________ // fileupload.aspx ... <form id="Form1" method="post" runat="server"> ... <input type="text" name="UserComments" id="UserComments"> <br /> <input type="file" name="File1" id="File1">; ... </form> ...
// fileupload.aspx.vb ... Dim _CurrentUpload As Upload = UploadsManager.GetUpload // Get the value of UserComments form field. Dim _UserComments As String = _CurrentUpload.Form("UserComments") Dim _UploadedFiles As UploadedFileCollection = _CurrentUpload.UploadedFiles // Get the UploadedFile object by form field name Dim _File As UploadedFile = _UploadedFiles("File1") Dim _FileName As String = _File.ClientFileName ... ____________________________ ' fileupload.aspx ... <form id="Form1" method="post" runat="server"> ... <input type="text" name="UserComments" id="UserComments"> <br /> <input type="file" name="File1" id="File1"> ... </form> ...
