Here is my original code from Visual Studio.
private void Textbox_TextChanged(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(((TextBox)sender).Text))
okButton.Enabled = false;
else
okButton.Enabled = true;
}
I also tried to
private void Textbox_TextChanged(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(textbox1.text) && string.IsNullOrEmpty(textbox2.text) )// I added && to all the text box, but it still gave me the same result.
okButton.Enabled = false;
else
okButton.Enabled = true;
}

New Topic/Question
Reply




MultiQuote







|