Skip to main content
A newer version of this page is available. .
Tab

ASPxHiddenField.Add(String, Object) Method

Adds a new value to the control’s collection of property name/value pairs.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

public void Add(
    string propertyName,
    object propertyValue
)

Parameters

Name Type Description
propertyName String

A string value that specifies the property name. It can contain letters, digits, underline characters, and dollar signs. It cannot begin with a digit character.

propertyValue Object

An object that represents the value of the specified property.

Remarks

The Add method can be used to add a new value to the control’s collection of the property name/value pairs. Alternatively, you can use the ASPxHiddenField.Set method for the same purpose. To delete all values from the control’s collection of property name/value pairs, use the ASPxHiddenField.Clear method. An individual property name/value pair can be removed from the collection by using the ASPxHiddenField.Remove method.

The ASPxHiddenField.Get method is used to obtain the value with the specified property name. Also, the value can be accessed by using the ASPxHiddenField.Item property.

Items from the control’s collection of the property name/value pairs can also be manipulated on the client side by using the following methods: ASPxClientHiddenField.Add, ASPxClientHiddenField.Set, ASPxClientHiddenField.Get, ASPxClientHiddenField.Clear, ASPxClientHiddenField.Remove.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Add(String, Object) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also