How to remove duplicate from database and bind to drop down list?
Example:
I have the data from one of the table in database -> { A,B,C,D,A,B,B,C } .
I just want to bind to my dropdown list { A,B,C,D }.
Can anybody help me in my problem?
Thanks a lot


Asp.Net HeinRank #6,010 · 279 reputationPosted May 20, 2015, 8:30 PM EDT
Abrar Ahmad AnsariRank #3,390 · 425 reputationPosted May 20, 2015, 9:21 PM EDT
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
List
var uniqueItem = ListItem.Distinct().ToList();
}
}
}