InputUrl<TValue> Class

An input component for editing URL values.

public class InputUrl<TValue> : InputBase<TValue>

Type parameters

TValue
The type of the value. Supported types are String and Uri.
Inheritance
InputBase<TValue> InputUrl<TValue>

Constructors

NameDescription
InputUrl()

InputUrl()

InputUrl.cs
public InputUrl()

No documentation is available.

Properties

NameDescription
ElementGets a reference to the rendered input element.
ParsingErrorMessageGets or sets the error message to display when the input value cannot be parsed.

Gets a reference to the rendered input element.

public ElementReference? Element { get; protected set; }

Property value

ElementReference?

ParsingErrorMessage

InputUrl.cs

Gets or sets the error message to display when the input value cannot be parsed.

public string ParsingErrorMessage { get; set; }

Property value

string

Methods

NameDescription
BuildRenderTree(RenderTreeBuilder)
FormatValueAsString(TValue?)Formats the value as a string. Derived classes can override this to determine the formatting used for InputBase<TValue>.CurrentValueAsString.
TryParseValueFromString(string?, TValue, string?)Parses a string to create an instance of TValue. Derived classes can override this to change how InputBase<TValue>.CurrentValueAsString interprets incoming values.

BuildRenderTree(RenderTreeBuilder)

InputUrl.cs
protected override void BuildRenderTree(RenderTreeBuilder builder)

Parameters

builder RenderTreeBuilder

No documentation is available.

FormatValueAsString(TValue?)

InputUrl.cs

Formats the value as a string. Derived classes can override this to determine the formatting used for InputBase<TValue>.CurrentValueAsString.

protected override string FormatValueAsString(TValue? value)

Parameters

value TValue?
The value to format.

Returns

string A string representation of the value.

TryParseValueFromString(string?, TValue, string?)

InputUrl.cs

Parses a string to create an instance of TValue. Derived classes can override this to change how InputBase<TValue>.CurrentValueAsString interprets incoming values.

protected override bool TryParseValueFromString(string? value, out TValue result, out string? validationErrorMessage)

Parameters

value string?
The string value to be parsed.
result TValue
An instance of TValue.
validationErrorMessage string?
If the value could not be parsed, provides a validation error message.

Returns

bool True if the value could be parsed; otherwise false.