Adding a value with Insert instead of Add method, wich gets me to the index, as an first argument
and the text as second argument.
var query = from filtxxxr in db.Entity
where fxxxr.Page == thispage
where fixxxr.Shared || filterUser > 0
orderby fixxxr.id descending
select new
{
id,
Name,
Page,
Shared
};
DropDownList.DataSource = query;
DropDownList.Items.Insert(0,"No Applied Filter");
DropDownList.DataValueField = "id";
DropDownList.DataTextField = "Name";
DropDownList.DataBind();
No comments:
Post a Comment