ratext box add string value " cots

2 posts, 0 answers
  1. mohamed
    mohamed avatar
    311 posts
    Member since:
    Mar 2011

    Posted 16 Feb 2013 Link to this post


    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.
  2. mohamed
    mohamed avatar
    311 posts
    Member since:
    Mar 2011

    Posted 17 Feb 2013 Link to this post

    Problem Resolved.

    regards,
    Mohamed
Back to Top