<p>Ok guys and gals, here is my problem:</p>

<p>I've built a custom control that uses a textbox to present data to the user. </p>

<p>When the user interacts with the control the <strong>value of that textbox is altered with client side javascript</strong>.</p>

<p>I also have a button on my page. When the user clicks the button I want to take the value from the custom control (aka. the textbox) and use it elsewhere.</p>

<p>So, in the onClick event for the button I do something like this:</p>

<pre><code>this.myLabel.Text = this.customControl.Value;
</code></pre>

<p>The problem is that the custom control does not have the new textbox value available. In the custom control the textbox is empty. However, I can see the correct value in the Request.Form collection.</p>

<p>Am I doing something wrong here? Or should I be reading from Request.Form?!</p>

Ah ha! I've solved my own problem!
Because I had set Readonly="True" on the textbox control ASP.NET was not picking up it's value from the postback.
Instead I should have manually added the readonly attribute to the textbox during my user control construction.
eg.
```
```
this.textBox.Attributes.Add("readonly", "readonly");
```
```