Read only controls are not posted back
to the server. So, when you do a
postback you will lose the value in a read only control. You will need
to not make the control read only. Instead, you can set the ReadOnly=False
on your textbox and use the following code to solve the
problem.
1: protected void Page_Load(object sender, EventArgs e)
2: {
3: TextBox1.Attributes.Add("readonly", "readonly");
4: }