On
Page_Load
event , write the following code.
protected void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack) {
TextBox1.Enabled = true;
}
}
On
RadioButton1_CheckedChanged
event, write the following code.
protected void RadioButton1_CheckedChanged(object sender, System.EventArgs e)
{
if (RadioButton1.Checked) {
TextBox1.Enabled = false;
} else {
TextBox1.Enabled = true;
}
}