When you type in textbox
, the button will call, but when you do not have anything in textbox
it will hang up. I was able to make the method of the button connect but I could not do the disconnect if the textbox
is null
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (txt.Text == null)
{
bt.Enabled = false;
}
else
{
bt.Enabled = true;
}
}