FormEditor

FormEditor class

This class represents the editor over the HTMLFormElement that creates a easier way for .net developers to edit the html forms.

public class FormEditor : IDisposable, IEnumerable<FormElement>

Properties

Name Description
Action { get; set; } Server-side form handler. See the action attribute definition in HTML 4.01.
Count { get; } The number of form controls in the form.
Form { get; } The original HTMLFormElement that is associated with current instance of FormEditor.
Item { get; } Returns the element by specified index. (2 indexers)
Method { get; set; } HTTP method [IETF RFC 2616] used to submit form. See the method attribute definition in HTML 4.01.

Methods

Name Description
static Create(HTMLFormElement) Creates a new FormEditor based on HTMLFormElement.
static Create(HTMLDocument, int) Creates a new FormEditor based on HTMLFormElement selected from the Forms collection by index.
static Create(HTMLDocument, string) Creates a new FormEditor based on HTMLFormElement selected from the document by id.
static CreateNew(HTMLDocument) Creates a new HTMLFormElement and associated it with FormEditor. HTMLFormElement is created in the detached from the document state; in order to attach it to the document, please select proper location and use AppendChild method.
Add<T>(string) Creates a new HTMLElement and adds it to the end of the form.
AddInput(string) Creates a new InputElement and adds it to the end of the form.
AddInput(string, InputElementType) Creates a new InputElement and adds it to the end of the form.
Dispose() Releases unmanaged and managed resources.
Fill(Dictionary<string, string>)
GetElement<T>(int) Returns the element by specified index.
GetElement<T>(string) Returns the element by specified name.
GetEnumerator() Gets the enumerator.

See Also