public void BindDropDown() { CommonBindLocation obj = new CommonBindLocation(); obj.BindLocation(ddlFrom); obj.BindLocation(ddlTo); obj.BindLocation(ddlRoundFrom); obj.BindLocation(ddlRoundTo); ListItem lst = new ListItem("--Select--", "0"); ddlFrom.Items.Insert(0, lst); ddlTo.Items.Insert(0, lst); ddlRoundFrom.Items.Insert(0, lst); ddlRoundTo.Items.Insert(0, lst); }
protected void BindDropDown() { try { CommonBindLocation obj = new CommonBindLocation(); obj.BindLocation(ddlSource); obj.BindLocation(ddlDestination); ListItem lst = new ListItem("--Select--", "0"); ddlSource.Items.Insert(0, lst); ddlDestination.Items.Insert(0, lst); } catch (Exception ex) { new Error().LogErrors(ex.Message, ex.StackTrace, Page); } }