i have click the radio button1 the disable the text box. the radio button2 click
the text box is enable but first i have click radio button2 and then i have click radio button1 not disable the text box How to solve the problem
enter code here
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
txtrb.Enabled = true;
}
}
protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
{
{
if (RadioButton1.Enabled == true )
{
txtrb.Enabled = false ;
}
}
}
protected void Ra开发者_Go百科dioButton2_CheckedChanged(object sender, EventArgs e)
{
if (RadioButton2.Enabled == true)
{
txtrb.Enabled = true ;
}
}
}
}
I think you have to check
if (RadioButton1.checked == true ) and if (RadioButton2.checked== true )
精彩评论