ASPxClientHiddenField.Set(propertyName, propertyValue) Method

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


    propertyName: string,
    propertyValue: any
): void


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 any

An object that represents the property value.


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

Use the ASPxClientHiddenField.Get method, to obtain the value with specified property name.

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


The following part of the ASPxHiddenField online demo illustrates how to manipulate the ASPxHiddenField items collection on the client and server side by using the ASPxClientHiddenField.Get, ASPxClientHiddenField.Set, ASPxHiddenField.Item property etc.

var viewsCount = 3;
function ShowPrevPage(){
function ShowNextPage(){
function ChangeActiveViewIndex(changeIndex){
    hfAnswers.Set("questionIndex", GetQuestionIndex() + changeIndex);
function GetQuestionIndex(){
    return hfAnswers.Get("questionIndex");
function IsPreviewPage(){
    return GetQuestionIndex() == (viewsCount - 1);
function OnSeasonChanged(s, e){
    hfAnswers.Set("month", 0);
    hfAnswers.Set("season", s.GetSelectedIndex());
function OnMonthChanged(s, e){
    hfAnswers.Set("month", s.GetSelectedIndex());
<script runat="server">
     private void LoadPreview() {
         int seasonIndex = (int)hfAnswers["season"];
         int monthIndex = (int)hfAnswers["month"];
         lblSelectedSeason.Text = seasons[seasonIndex];
         lblSelectedMonth.Text = months[seasonIndex][monthIndex];

 <dxhf:ASPxHiddenField runat="server" ClientInstanceName="hfAnswers" ID="hfAnswers">
See Also