BasePages.PageBaseMaster.PopulateBootTemplatesDdl C# (CSharp) Method

PopulateBootTemplatesDdl() protected method

protected PopulateBootTemplatesDdl ( DropDownList ddl ) : void
ddl System.Web.UI.WebControls.DropDownList
return void
        protected void PopulateBootTemplatesDdl(DropDownList ddl)
        {
            ddl.DataSource = BLL.BootTemplate.SearchBootTemplates().Select(i => new { i.Id, i.Name });
            ddl.DataValueField = "Id";
            ddl.DataTextField = "Name";
            ddl.DataBind();
            ddl.Items.Insert(0, new ListItem("No Template", "-1"));
        }