I have the following code:
DrExistingData = myCommand.ExecuteReader();
if (DrExistingData.HasRows)
{
string participant = "";
string participants = "";
while (DrExistingData.Read())
{
participant = DrExistingData["Name"].ToString();
participants = participant + " , " + participants;
}
Participant.Text = participants;
}
Participant is a textbox which is showing the list of names separated by commas but the problem is that the last name is also followed by a comma like:
Simren,Preety,jyoti, i want to remove the last comma from this list. Please help