/// <summary> /// Method is used to bind observation type list /// </summary> public void VET_Get_ObservationTypeList() { try { BLL_VET_Index objBLLIndx = new BLL_VET_Index(); DataTable dtObsType = objBLLIndx.VET_Get_ObservationTypeList(); ddlType.Items.Clear(); ddlType.DataSource = dtObsType; ddlType.DataTextField = "ObsTypName"; ddlType.DataValueField = "ID"; ddlType.DataBind(); ddlType.Items.FindByText(Convert.ToString(dtObsType.Rows[1]["ObsTypName"])).Selected = true; } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true); } }