protected void ddlProductDiv_SelectedIndexChanged(object sender, EventArgs e) { ShowHideFrames(); DataSet dsTemp = (DataSet)ViewState["ds"]; if (ddlProductDiv.SelectedIndex != 0) { btnSubmit.CausesValidation = true; } else { if (dsTemp.Tables[0].Rows.Count > 0) { btnSubmit.CausesValidation = false; } else { btnSubmit.CausesValidation = true; } } // Changed by Mukesh to break the large product line objCommonClass.BindProductLineForCPWebForm(ddlProductLine, int.Parse(ddlProductDiv.SelectedValue.ToString())); }