private void BindPeriodDropDown() { DataTable dtPeriod; dtPeriod = XMLBo.GetDatePeriod(path); ddlPeriod.DataSource = dtPeriod; ddlPeriod.DataTextField = "PeriodType"; ddlPeriod.DataValueField = "PeriodCode"; ddlPeriod.DataBind(); ddlPeriod.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select a Period", "Select a Period")); }
private void BindPeriodDropDown() { DataTable dtPeriod; path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); dtPeriod = XMLBo.GetDatePeriod(path); ddlPeriod.DataSource = dtPeriod; ddlPeriod.DataTextField = "PeriodType"; ddlPeriod.DataValueField = "PeriodCode"; ddlPeriod.DataBind(); ddlPeriod.Items.Insert(0, new ListItem("Select a Period", "Select a Period")); }
/// <summary> /// Binding Period Dropdown From Xml File /// </summary> private void BindPeriodDropDown() { path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); DataTable dtPeriod; dtPeriod = XMLBo.GetDatePeriod(path); ddlPeriod.DataSource = dtPeriod; ddlPeriod.DataTextField = "PeriodType"; ddlPeriod.DataValueField = "PeriodCode"; ddlPeriod.DataBind(); ddlPeriod.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select a Period", "0")); ddlPeriod.Items.RemoveAt(15); ddlPeriod.SelectedIndex = 0; }