I'm working on a project of type "ASP.NET dynamic data LINQ to LINQ application".
When i execute my application I'm getting all labels and DropDownLists dynamically binding.
I'm referring this blog.
Now I need to populate those DropDownList based on my criteria. Currently, it is populating all the records which is there in table for that column. How can I customize this DropDownList like I want to select only User with Mak
name?
I guess i need to made some linq query here when dropdown populated values? not sure
protected void Page_Load(object sender, EventArgs e)
{
if (DropDownList1.Items.Count == 0)
{
if (Mode == DataBoundControlMode.Insert || !Column.IsRequired)
{
DropDownList1.Items.Add(new ListItem("[Not Set]", ""));
}
PopulateListControl(DropDownList1);
}
SetUpValidator(RequiredFieldValidator1);
SetUpValidator(DynamicValidator1);
}