Check the comments inside the code block.
protected void txtContractorBusinesscapacity_TextChanged(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(txtContractorBusinesscapacity.Text))
{
int value = 0;
bool isParsed = int.TryParse(txtContractorBusinesscapacity.Text, out value);
if (isParsed && value <= 25 && ddlContractorTypeID.SelectedValue != "C")
{
DisableConsumerPart();
}
else
{
EnableConsumerPart();
}
}
}