hi all,
i have designed a form which contains few controls,i want to do validation upon button click, i used errorprovider to set error if that field is empty
i used the following code
bool No_Error = true;
if(OfficeNameComboBox.Text == "")
{
OffNameErrorProvider.SetError(OfficeNameComboBox,"Invalid Input");
return No_Error=false;
}
i dont want to check the condition directly in the if condition
i want some thing like this
if(//get property to get the value of combo box == "")
{
//do something
}
how to achieve this!!
thanks in advance,