title: How to change the value of input hidden on server-side
body: <p>I have a form with hidden fields:</p>
  
  <pre><code>&lt;form id="Form1" runat="server" style="width: 100%; height: 100%; overflow: hidden"       onsubmit="return false;"&gt;
  &lt;div&gt;    
  &lt;input type="hidden" runat="server" id="TrackColors" value=""/&gt;            
  &lt;input type="hidden" runat="server" id="Relogin" value=""/&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>After Page_Load() on the server-side is called function:</p>
  
  <pre><code>protected void SomeFunction()
      {
          Dictionary&lt;int, int&gt; trackColors = new Dictionary&lt;int, int&gt;();
          if (!String.IsNullOrEmpty(TrackColors.Value))
              trackColors = ReadValues(TrackColors.Value);
  
      //if value is null or empty it's assigned to a different
  
  
          TrackColors.Attributes["value"] = FormValues(trackColors); //FormValues() return string
  
      //change is visible        
      }
  
  
      string FormValues(Dictionary&lt;int, int&gt; values)
      {
      string result = "";
      if (values == null || values.Count == 0)
          return result;
  
      foreach (KeyValuePair&lt;int, int&gt; p in values)
          result += p.Key + "@@" + p.Value + "^^";
      result = result.TrimEnd('^');
  
      return result;
  }
  </code></pre>
  
  <p>If I change the selected field of ComboBox, the function is called:</p>
  
  <pre><code>&lt;dx:ASPxTextBox ID="ColorTrackCarID" Visible="false" Text='&lt;%# Eval("CarId") %&gt;' /&gt;
                      &lt;dx:ASPxComboBox ID="ASPxComboBox1" runat="server" SelectedIndex='&lt;%# Eval("TrackColor") %&gt;' 
                                      ValueType="System.String" Width="30" ShowImageInEditBox="true" 
                          ondatabinding="ASPxComboBox1_DataBinding"&gt;
                                      &lt;ClientSideEvents SelectedIndexChanged="function (s,e) { 
                                     if (window.TrackColorChanged != null)TrackColorChanged(s,e); }" /&gt;
  &lt;/dx:ASPxComboBox&gt;
  
  
  
  function TrackColorChanged(s, e) {
              var TrackColors = document.getElementById('TrackColors');
              if (TrackColors == null || TrackColors.value == "")
                  return values;      
              //values is always emply    
          }
  </code></pre>
  
  <p>I understand the value of the form fields are not passed back to the client-side. The question is: <strong>How to pass these values ​​back?</strong></p>
  
  <p>And if I change the value on the server-side in Page_Load (), then the client can see everything, that is,</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
  TrackColors.Attributes["value"] = "bla-bla-bla";
  //All changes are visible on the client-side
  }
  </code></pre>
  
  <p>Thank you for your attention.</p>