if (Convert.ToInt32(txtTvalidqty.Text) > Convert.ToInt32(txtPlanQty.Text))
-- Check Null value first for both txtTvalidqty.Text and txtPlanQty.Text like this.
if (string.IsNullOrEmpty(txtTvalidqty.Text))
{
txtTvalidqty.Text="0";
}
if (string.IsNullOrEmpty(txtPlanQty.Text))
{
txtPlanQty.Text="0";
}
if (Convert.ToInt32(txtTvalidqty.Text) > Convert.ToInt32(txtPlanQty.Text))
Hope, this helps.
--
Thanks,
Abhay Bansal