ASPxHiddenField.Contains(String) Method
Returns a value indicating whether the value with the specified property name is contained within the ASPxHiddenField control’s value collection.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
propertyName | String | A string value that specifies the property name. |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
The Contains method is used to determine whether the value with the specified property name is contained within the ASPxHiddenField‘s value collection. To obtain the specified value from the collection, use the ASPxHiddenField.Get method or the ASPxHiddenField.Item property.
Use the ASPxHiddenField.Add or ASPxHiddenField.Set methods to add a new value to the control’s value collection.
If you want to remove all values from the control’s value collection, use the ASPxHiddenField.Clear method. The ASPxHiddenField.Remove method is used to delete an individual value.
Example
protected void ASPxButton1_Click(object sender, EventArgs e) {
ASPxButton btn = sender as ASPxButton;
if(ASPxHiddenField1.Contains("newproperty")) {
btn.Text = ASPxHiddenField1["newproperty"].ToString();
}
}