Class InputElement

Class InputElement

Namespace: Aspose.Html.Forms
Assembly: Aspose.HTML.dll (25.2.0)

The InputElement represents a wrapper that is associated with the HTMLInputElement.

[ComVisible(true)]
public class InputElement : FormElement<htmlinputelement>

Inheritance

objectFormElementFormElement<htmlinputelement>InputElement

Inherited Members

FormElement<htmlinputelement>.HtmlElement, FormElement.ElementType, FormElement.Name, FormElement.Id, FormElement.Value, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties

Id

Represents the Id attribute of the input element.

public override string Id { get; set; }

Property Value

string

List

Represents a list of options

public DataListElement List { get; }

Property Value

DataListElement

Name

Represent the name attribute of the input element.

public override string Name { get; set; }

Property Value

string

Type

Type of the form control.

public InputElementType Type { get; set; }

Property Value

InputElementType

Value

Represents the string value of the input element that is directly mapped to the ‘value’ attribute.

public override string Value { get; set; }

Property Value

string

Methods

AddFile(string)

This method adds files to the Aspose.Html.HTMLInputElement.Files collection which will be sent during the next web request.

public void AddFile(string uri)

Parameters

uri string

The file path.

GetCheckboxValue()

Returns the checkedness state for the input element with the Checkbox type .

public bool GetCheckboxValue()

Returns

bool

The checkedness state.

GetColorValue()

This method is used to get the value as a color. This method is valid if only only type of the input element is “color”

public Color GetColorValue()

Returns

Color

The color object.

GetDateTimeLocalValue()

This method is used to get the value as a System.DateTime object object. This method is valid if only only type of the input element is “datetime-local”

public DateTime GetDateTimeLocalValue()

Returns

DateTime

The date object.

GetDateValue()

This method is used to get the value as a System.DateTime object. This method is valid if only only type of the input element is “date”

public DateTime GetDateValue()

Returns

DateTime

The date object.

GetEmailValue()

This method is used to get the value as an email string object. This method is valid if only only type of the input element is “email”

public string GetEmailValue()

Returns

string

The email.

GetMonthValue()

This method is used to get the value as a System.DateTime object. This method is valid if only only type of the input element is “month”

public DateTime GetMonthValue()

Returns

DateTime

The date object.

GetNumberValue()

This method is used to get the value as a number. This method is valid if only only type of the input element is “number”

public float GetNumberValue()

Returns

float

The number object.

GetPasswordValue()

This method is used to get the value as a password string object. This method is valid if only only type of the input element is “password”

public string GetPasswordValue()

Returns

string

The password.

GetRadioValue()

Returns the checkedness state for the input element with the radio type.

public bool GetRadioValue()

Returns

bool

The checkedness.

GetTimeValue()

This method is used to get the value as a System.TimeSpan object. This method is valid if only only type of the input element is “time”

public TimeSpan GetTimeValue()

Returns

TimeSpan

The TimeSpan object.

GetUrlValue()

This method is used to get the value as Aspose.Html.Url object. This method is valid if only only type of the input element is “url”

public Url GetUrlValue()

Returns

Url

The field value as url.

GetWeekValue()

This method is used to get the value as a week string. This method is valid if only only type of the input element is “week”

public string GetWeekValue()

Returns

string

The week value.

SetCheckboxValue(bool)

Sets the checkedness state for the input elemen with the Checkbox type.

public void SetCheckboxValue(bool value)

Parameters

value bool

The checkedness.

SetColorValue(Color)

This method is used to set color as a value for input element. This method is valid if only the type of the input element is “color”

public void SetColorValue(Color value)

Parameters

value Color

The color object.

SetDateTimeLocalValue(DateTime)

This method is used to set System.DateTime object as a value for input element. This method is valid if only the type of the input element is “datetime-local”

public void SetDateTimeLocalValue(DateTime value)

Parameters

value DateTime

The date object.

SetDateValue(DateTime)

This method is used to set System.DateTime object as a value for input element. This method is valid if only the type of the input element is “date”

public void SetDateValue(DateTime value)

Parameters

value DateTime

The date object.

SetEmailValue(string)

This method is used to set email string as a value for input element. This method is valid if only the type of the input element is “email”

public void SetEmailValue(string value)

Parameters

value string

The email.

SetMonthValue(DateTime)

This method is used to set System.DateTime object as a value for input element. This method is valid if only the type of the input element is “month”

public void SetMonthValue(DateTime value)

Parameters

value DateTime

The date object.

SetNumberValue(float)

This method is used to set number as a value for input element. This method is valid if only the type of the input element is “number”

public void SetNumberValue(float value)

Parameters

value float

The number object.

SetPasswordValue(string)

This method is used to set password string as a value for input element. This method is valid if only the type of the input element is “password”

public void SetPasswordValue(string value)

Parameters

value string

The password.

SetRadioValue(bool)

Sets the checkedness state for the input element with the radio type.

public void SetRadioValue(bool value)

Parameters

value bool

The checkedness.

SetTimeValue(TimeSpan)

This method is used to set System.TimeSpan object as a value for input element. This method is valid if only the type of the input element is “time”

public void SetTimeValue(TimeSpan value)

Parameters

value TimeSpan

The TimeSpan object.

SetUrlValue(Url)

This method is used to set Aspose.Html.Url object as a value for input element. This method is valid if only the type of the input element is “url”

public void SetUrlValue(Url value)

Parameters

value Url

The url value.

SetWeekValue(string)

This method is used to set ‘week’ string as a value for input element. This method is valid if only the type of the input element is “week”

public void SetWeekValue(string value)

Parameters

value string

The week value. </htmlinputelement></htmlinputelement>