int ID = convert.ToInt32(ddl.SelectedItem.Value)
tblEntities Entities = new tblEntities();
ddl.DataSource = Entities.widget.Where(p => p.MID == ID).ToList();
ddl.DataTextField = "ID";
ddl.DataValueField = "ID";
ddl.DataTextFormatString = "Widget - " + "{0}"; <------ Formatted Text
ddl.DataBind();
ddl.Items.Insert(0, new ListItem("--Select--", "-1"));
No comments:
Post a Comment
Comments