Posted on: 1/6/2014 3:12:29 PM | Views : 541

Hi.  I have a DropDownList that contains a list of columns from a database table.  I need to use the selected item of the dropdownlist in  a linq query to populate another DropDownList.  Is this possible?  This is how I populate my first DropDownList that contains the columns from the table.
public void ddlColumnPopulate() { var gvColumns = GridView1.Columns; var viewName = ((IDataSource)EntityDataSource1).GetViewNames().OfType<string>().First(); var view = (EntityDataSourceView)((IDataSource)EntityDataSource1).GetView(viewName); var schema = view.GetViewSchema(); var dsColumns = schema.Columns; var dvColumnsDict = gvColumns.OfType<BoundField>().ToDictionary(a => a.DataField); foreach (DataColumn c in dsColumns) { //var li = new ListItem(string.Format("{0}: {1}&q ...

Go to the complete details ...