Assembly: EasyAlgo.EAUpload (in EasyAlgo.EAUpload.dll)
Version: 1.3.2.0
Syntax
| C# |
|---|
public class Form : NameObjectCollectionBase |
| Visual Basic (Declaration) |
|---|
Public Class Form _ Inherits NameObjectCollectionBase |
Remarks
This collection is based on the NameObjectCollectionBase class.
Provides an access to the values in the form collection posted from a browser. You can get a form fields values as on Uploading stage as on Complete stage of an upload.
You cannot create an instance of this class with the new keyword. Use Upload..::.FormElements property for getting a Form class instance.
Provides an access to the values in the form collection posted from a browser. You can get a form fields values as on Uploading stage as on Complete stage of an upload.
You cannot create an instance of this class with the new keyword. Use Upload..::.FormElements property for getting a Form class instance.
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> ...
Inheritance Hierarchy
System..::.Object
System.Collections.Specialized..::.NameObjectCollectionBase
EasyAlgo.EAUpload..::.Form
System.Collections.Specialized..::.NameObjectCollectionBase
EasyAlgo.EAUpload..::.Form
