title: Why, when I try to access the value of a runat="server" input tag from the code behind, am I getting the original value instead of the latest value?
body: <p>I have a hidden input that holds the value of a nonce used for payment processing.</p>
  <p><code>&lt;input id=&quot;nonce&quot; runat=&quot;server&quot; clientidmode=&quot;Static&quot; /&gt;</code></p>
  <p>When the page first loads, the value called from the server side is obviously the empty string. But there is a button that updates the value of this input with the appropriate nonce:</p>
  <pre><code>button.addEventListener('click', function () {
                instance.requestPaymentMethod(function (err, payload) {
                    if (err) {
                        console.log('Error', err);
                        return;
                    }
                    document.querySelector('#nonce').value = payload.nonce;
                    nextPrev(1);
                });
            });
  </code></pre>
  <p>After the button gets clicked and the event gets triggered, the value of the nonce changes. Using the inspect tools, I find that the markup looks like this after clicking the button:</p>
  <pre><code>&lt;input name=&quot;nonce&quot; type=&quot;hidden&quot; id=&quot;nonce&quot; value=&quot;tokencc_bf_z22pd4_9nm74f_sgg8nz_dgmwvy_qc5&quot;&gt;
  </code></pre>
  <p>Which is what I expected.</p>
  <p>The issue is that when another button is clicked that calls a server-side function that uses this nonce value, the nonce appears to be blank from the backend:</p>
  <pre><code>var paymentMethodRequest = new PaymentMethodRequest
              {
                  CustomerId = Client.User.BrainTreeCustomerID,
                  PaymentMethodNonce = nonce.Value
              };
  </code></pre>
  <p><code>nonce.Value</code> is an empty string. Even though immediately BEFORE clicking the server side button, the value is not empty and is equal to &quot;tokencc_bf_z22pd4_9nm74f_sgg8nz_dgmwvy_qc5&quot;, as in the sample two code blocks up.</p>
  <p>Does anyone have any idea on what is going on here?</p>