This is a migrated thread and some comments may be shown as answers.

ratext box add string value " cots

1 Answer 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
mohamed
Top achievements
Rank 1
mohamed asked on 16 Feb 2013, 12:10 PM

I want add " from every assigned after that

ProjId.Text = "";
                            string md = empcnt[0].Projectid.ToString();
                            string[] md1 = md.Split(',');
 
                            for (int i = 0; i < md1.Length; i++)
                            {
                                string item1 = md1[i].ToString();
                                if (i == 0)
                                    ProjId.Text += item1 + '"' + ',';
                                else if (i == md1.Length - 1)
                                    ProjId.Text += '"' + item1;
                                else
                                    ProjId.Text += '"' + item1 + '"' + ',';
                            }
                            //int cnt = ProjId.Text.Count() - 1;
                            //string Value = ProjId.Text.Substring(0, cnt);
                            List<string> listIDs = new List<string> { ProjId.Text };
 
                            var ProjMas = (from a in db.DSProjectMasters where a.FinalStatus == "Cls" && a.Status != "Del" && a.CompCode == compcode && listIDs.Contains(a.ProjectCode) select new { a.ProjectCode, a.ProjectTitle }).ToList();

but result is come line that one extra back slash also there .
"WEST\",\"xs"
how i remove it


or after assign i want like that i want to remove \
"west","xs" this is the i want to output


Thanks Advance,
Mohamed.

1 Answer, 1 is accepted

Sort by
0
mohamed
Top achievements
Rank 1
answered on 17 Feb 2013, 08:17 AM
Problem Resolved.

regards,
Mohamed
Tags
General Discussions
Asked by
mohamed
Top achievements
Rank 1
Answers by
mohamed
Top achievements
Rank 1
Share this question
or