Sandeep Kumar

Sandeep Kumar

  • 430
  • 4.3k
  • 545.1k

Comma seperated data in Dropdownlist

Jun 26 2018 7:51 AM
Hi Guys,
 
I have one dropdown and I need to display  data in  dropdown as comma seprated like a,b,c
 
Here is my code:
 
rddlMuster.DataTextField = "ZoneName";
rddlMuster.DataValueField = "ZoneID";
rddlMuster.DataSource = objUtilsDAO.GetZonesByYardID(lstYards.FirstOrDefault().YardID).Where(zm => zm.IsCS == false && zm.ZoneType == (int)Enums.ZoneType.Mustering_Zone).OrderBy(zm => zm.ZoneName);
rddlMuster.DataBind();
 
Can anyone please help me to get comma seprated value in dropdown while  working with linq in asp.net? 

Answers (5)