Class FormSubmitter
Namespace: Aspose.Html.Forms
Assembly: Aspose.HTML.dll (25.7.0)
This class allows to prepare specified Aspose.Html.HTMLFormElement, collects values from the form element, submit them to the remote server and receives a response.
[ComVisible(true)]
public class FormSubmitter : IDisposableInheritance
Implements
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
FormSubmitter(HTMLFormElement)
Initializes a new instance of the Aspose.Html.Forms.FormSubmitter class based on Aspose.Html.HTMLFormElement.
public FormSubmitter(HTMLFormElement form)Parameters
form HTMLFormElement
The html form element.
FormSubmitter(HTMLDocument, int)
Initializes a new instance of the Aspose.Html.Forms.FormSubmitter class based on Aspose.Html.HTMLFormElement selected by index from Aspose.Html.HTMLDocument.
public FormSubmitter(HTMLDocument document, int index)Parameters
document HTMLDocument
The HTML document.
index int
The index of the form.
FormSubmitter(HTMLDocument, string)
Initializes a new instance of the Aspose.Html.Forms.FormSubmitter class based on Aspose.Html.HTMLFormElement selected by identifier from Aspose.Html.HTMLDocument.
public FormSubmitter(HTMLDocument document, string id)Parameters
document HTMLDocument
The HTML document.
id string
The element identifier.
FormSubmitter(FormEditor)
Initializes a new instance of the Aspose.Html.Forms.FormSubmitter class.
public FormSubmitter(FormEditor editor)Parameters
editor FormEditor
The FormEditor.
Properties
Action
Server-side form handler. See the action attribute definition in HTML 4.01.
public string Action { get; set; }Property Value
Method
HTTP method [IETF RFC 2616] used to submit form. See the method attribute definition in HTML 4.01.
public HttpMethod Method { get; set; }Property Value
Methods
Dispose()
Releases unmanaged and - optionally - managed resources.
public void Dispose()Submit()
Submits the form data to the server.
public SubmissionResult Submit()Returns
The result of the submission.
Submit(CookieContainer)
Submits the form data to the server with specified cookies.
public SubmissionResult Submit(CookieContainer cookieContainer)Parameters
cookieContainer CookieContainer
The cookie container.
Returns
The result of the submission.
Submit(ICredentials)
Submits the form data to the server with specified user credentials.
public SubmissionResult Submit(ICredentials credentials)Parameters
credentials ICredentials
The authentication information for the request.
Returns
The result of the submission.
Submit(ICredentials, CookieContainer)
Submits the form data to the server with specified user credentials and cookies.
public SubmissionResult Submit(ICredentials credentials, CookieContainer cookieContainer)Parameters
credentials ICredentials
The authentication information for the request.
cookieContainer CookieContainer
The cookie container.
Returns
The result of the submission.
Submit(TimeSpan)
Submits the form data to the server with specified timeout.
public SubmissionResult Submit(TimeSpan timeout)Parameters
timeout TimeSpan
The number of milliseconds to wait before the request times out.
Returns
The result of the submission.
Submit(TimeSpan, CookieContainer)
Submits the form data to the server with specified timeout and cookies.
public SubmissionResult Submit(TimeSpan timeout, CookieContainer cookieContainer)Parameters
timeout TimeSpan
The number of milliseconds to wait before the request times out.
cookieContainer CookieContainer
The cookie container.
Returns
The result of the submission.
Submit(ICredentials, TimeSpan)
Submits the form data to the server with specified user credentials and timeout.
public SubmissionResult Submit(ICredentials credentials, TimeSpan timeout)Parameters
credentials ICredentials
The authentication information for the request.
timeout TimeSpan
The number of milliseconds to wait before the request times out.
Returns
The result of the submission.
Submit(ICredentials, TimeSpan, CookieContainer)
Submits the form data to the server with specified user credentials, timeout and cookies.
public SubmissionResult Submit(ICredentials credentials, TimeSpan timeout, CookieContainer cookieContainer)Parameters
credentials ICredentials
The authentication information for the request.
timeout TimeSpan
The number of milliseconds to wait before the request times out.
cookieContainer CookieContainer
The cookie container.
Returns
The result of the submission.
Submit(ICredentials, TimeSpan, bool)
Submits the form data to the server with specified user credentials.
public SubmissionResult Submit(ICredentials credentials, TimeSpan timeout, bool preAuthenticate)Parameters
credentials ICredentials
The authentication information for the request.
timeout TimeSpan
The number of milliseconds to wait before the request times out.
preAuthenticate bool
The value that indicates whether to send an Authorization header with the request.
Returns
The result of the submission.
Submit(ICredentials, TimeSpan, bool, CookieContainer)
Submits the form data to the server with specified user credentials and cookies.
public SubmissionResult Submit(ICredentials credentials, TimeSpan timeout, bool preAuthenticate, CookieContainer cookieContainer)Parameters
credentials ICredentials
The authentication information for the request.
timeout TimeSpan
The number of milliseconds to wait before the request times out.
preAuthenticate bool
The value that indicates whether to send an Authorization header with the request.
cookieContainer CookieContainer
The cookie container.
Returns
The result of the submission.