B M Suchitra

B M Suchitra

  • NA
  • 507
  • 419.1k

Remove duplicate values from dropdownlist ?

Jan 17 2012 4:37 AM
Hi,

When user selects a row in gridview i need to display the selected value in the dropdownlist.. The dropdownlits are populated at page load event... the selected value is getting displayed along with the value in the database.. How do get rid of duplicates?

Answers (8)

0
Charlie Grande

Charlie Grande

  • 0
  • 3
  • 743
Sep 26 2015 3:19 PM
It removes the unicode but the problem is , the 3rd,4th etc message sticks to the second one. It is sent together with the second message
0
Guest User

Guest User

  • Tech Writer
  • 4.2k
  • 2.3k
Sep 25 2015 8:29 AM
You are using TrimStart(). This will try and remove the specified characters from the start of your string. Wouldn't it make more sense to just use:
 
   recvDt = recvDt.Replace("--++", "");
 
That ensures it will be removed from the string, no matter the position it is in.