Class FormEditor
Nazwa przestrzeń: Aspose.Html.Forms Zestaw: Aspose.HTML.dll (25.4.0)
Ta klasa reprezentuje redaktora nad Aspose.Html.HTMLFormElement, który tworzy łatwiejszy sposób dla programistów .net do edycji formularzy html.
[ComVisible(true)]
public class FormEditor : IEnumerable<formelement>, IEnumerable, IDisposable
Inheritance
Implements
IEnumerable
Dziedziczeni członkowie
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Properties
Action
Zobacz definicję atrybutów działania w HTML 4.01.
public string Action { get; set; }
Wartość nieruchomości
Count
Liczba kształtów kontroluje kształt.
public int Count { get; }
Wartość nieruchomości
Form
Oryginalny Aspose.Html.HTMLFormElement, który jest związany z bieżącą instancją Aspose.Html.Forms.FormEditor.
public HTMLFormElement Form { get; }
Wartość nieruchomości
Method
Metoda HTTP [IETF RFC 2616Zobacz definicję atrybut metody w HTML 4.01.
public HttpMethod Method { get; set; }
Wartość nieruchomości
Tego[Int]
Powrót elementu przez określony indeks.
public FormElement this[int index] { get; }
Wartość nieruchomości
Tego[strumień]
Powrót elementu przez określone imię lub identyfikator.
public FormElement this[string name] { get; }
Wartość nieruchomości
Methods
Dodaj t>(strumień)
Tworzy nowy Aspose.Html.HTMLElement i dodaje go do końca formularza.
public T Add<t>(string name) where T : FormElement
Parameters
name
string
Nazwa elementu
Returns
T
Nowy element formy
Rodzaj parametrów
T
Rodzaj elementu kształtu
AddInput(strumień)
Stwórz nowy Aspose.Html.Forms.InputElement i dodaj go do końca formularza.
public InputElement AddInput(string name)
Parameters
name
string
Nazwa elementu wejściowego
Returns
Powraca nowy utworzony Aspose.Html.Forms.InputElement.
AddInput(strumień, InputElementType)
Stwórz nowy Aspose.Html.Forms.InputElement i dodaj go do końca formularza.
public InputElement AddInput(string name, InputElementType type)
Parameters
name
string
Nazwa elementu wejściowego
type
InputElementType
Rodzaj elementu wejściowego
Returns
Powraca nowy utworzony Aspose.Html.Forms.InputElement.
Create(HTMLFormElement)
Tworzy nowy Aspose.Html.Forms.FormEditor oparty na Aspose.Html.HTMLFormElement.
public static FormEditor Create(HTMLFormElement form)
Parameters
form
HTMLFormElement
Element formatu html
Returns
Powrót nowej instancji klasy Aspose.Html.Forms.FormEditor
Create(HTMLDokumentacja, int)
Tworzy nowy Aspose.Html.Forms.FormEditor oparty na Aspose.Html.HTMLFormElement wybrane z kolekcji Aspose.Html.HTMLDocument.Forms według indeksu.
public static FormEditor Create(HTMLDocument document, int index)
Parameters
document
HTMLDocument
w dokumencie .
index
int
Wskaźnik wewnątrz kolekcji formularzy.
Returns
Powrót nowej instancji klasy Aspose.Html.Forms.FormEditor
Exceptions
Wyjątek jest ustalony, jeśli indeks wyjdzie z zakresu.
Create(HTMLDokumenty, String)
Tworzy nowy Aspose.Html.Forms.FormEditor oparty na Aspose.Html.HTMLFormElement wybrany z dokumentu przez ID.
public static FormEditor Create(HTMLDocument document, string id)
Parameters
document
HTMLDocument
w dokumencie .
id
string
z identyfikatorem .
Returns
Powrót nowej instancji klasy Aspose.Html.Forms.FormEditor
Exceptions
Wyjątkiem jest, jeśli nie ma elementu przez określony ID lub element nie jest typem formularza.
CreateNew(HTMLDokumenty)
Tworzy nowy Aspose.Html.HTMLFormElement i łączy go z Aspose.Html.Forms.FormEditor. Aspose.Html.HTMLFormElement jest tworzony w stanie oddzielnym od stanu dokumentu; aby dodać go do dokumentu, wybierz właściwą lokalizację i użyj metody Aspose.Html.Dom.Node.AppendChild(Aspose.Html.Dom.Node).
public static FormEditor CreateNew(HTMLDocument document)
Parameters
document
HTMLDocument
Podsumowując: HTMLDocument.
Returns
Powrót nowej instancji klasy Aspose.Html.Forms.FormEditor
Dispose()
Wydawanie niekontrolowanych i zarządzanych zasobów.
public void Dispose()
Fill(Słownik String, String=» » »)
Metoda ta wypełnia całą formę określonymi wartościami.
public void Fill(Dictionary<string, string=""> values)
Parameters
values
Dictionary
• <
string
, string
>
Wartości reprezentowane przez parę wartości kluczowej, która zawiera nazwę i wartość elementów kształtu.
Zestaw (Int)
Powrót elementu przez określony indeks.
public T GetElement<t>(int index) where T : FormElement
Parameters
index
int
Wskaźnik elementu
Returns
T
Wróć do elementu.
Rodzaj parametrów
T
Typ elementu kształtu
Zestaw (strumień)
Powrót elementu na określone imię.
public T GetElement<t>(string name) where T : FormElement
Parameters
name
string
Nazwa elementu
Returns
T
Wróć do elementu.
Rodzaj parametrów
T
Typ elementu kształtu
GetEnumerator()
Znajduje się numerator.
public IEnumerator<formelement> GetEnumerator()
Returns
IEnumerator • < FormElement >
Wróć do FormElements Enumerator.</string,></string,>