Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. probleam concatenate string in asp.net

probleam concatenate string in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
16 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Abhijit Jana

    Try this string a="\"a\""; string b = "\"b\""; string c = a + b;

    cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0

    R Offline
    R Offline
    Rinki Mukheraji
    wrote on last edited by
    #4

    same probleam

    A 1 Reply Last reply
    0
    • R Rinki Mukheraji

      i have two string "a" and "b" i want to concatenate string c = "a" "b" in asp.net my code is string p1 = "'" + b + '"' +' '; string p2 = "'" + c + '"' +' '; what result is coming c = "\p1\"\"p2"; what i want to result c = "p1" "p2"; how it will possible.

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #5

      string a = "hello";
      string b = "world!!!";
      string str = string.Format("\"{0}\"\"{1}\"", a, b);

      Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      R 1 Reply Last reply
      0
      • R Rinki Mukheraji

        i have two string "a" and "b" i want to concatenate string c = "a" "b" in asp.net my code is string p1 = "'" + b + '"' +' '; string p2 = "'" + c + '"' +' '; what result is coming c = "\p1\"\"p2"; what i want to result c = "p1" "p2"; how it will possible.

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #6

        I didnt understand.... you can use c="a" + "b"; and get c="ab" or if you want c="a""b" then you can write c="\"a\""+"\"b\""; simple... :rose:

        Abhishek Sur
        Web Developer

        R A 2 Replies Last reply
        0
        • M Manas Bhardwaj

          string a = "hello";
          string b = "world!!!";
          string str = string.Format("\"{0}\"\"{1}\"", a, b);

          Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

          R Offline
          R Offline
          Rinki Mukheraji
          wrote on last edited by
          #7

          no dost same probleam create i want to result c = "a" "b" only for this

          1 Reply Last reply
          0
          • R Rinki Mukheraji

            no same probleam

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #8

            not possible !!!! its working !!! my output is "a""b" now if you want c="a""b" then use string d="c="+ c; response.write(d)

            cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0

            1 Reply Last reply
            0
            • A Abhishek Sur

              I didnt understand.... you can use c="a" + "b"; and get c="ab" or if you want c="a""b" then you can write c="\"a\""+"\"b\""; simple... :rose:

              Abhishek Sur
              Web Developer

              R Offline
              R Offline
              Rinki Mukheraji
              wrote on last edited by
              #9

              i m getting same probleam plz implement practically in asp.net

              1 Reply Last reply
              0
              • A Abhishek Sur

                I didnt understand.... you can use c="a" + "b"; and get c="ab" or if you want c="a""b" then you can write c="\"a\""+"\"b\""; simple... :rose:

                Abhishek Sur
                Web Developer

                A Offline
                A Offline
                Abhijit Jana
                wrote on last edited by
                #10

                i think he is confused himslef !!! he dont know what to do !!! :laugh: :laugh:

                cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0

                R 1 Reply Last reply
                0
                • R Rinki Mukheraji

                  same probleam

                  A Offline
                  A Offline
                  Abhijit Jana
                  wrote on last edited by
                  #11

                  You are not clear about your problem . answer is given !!!!!

                  cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0

                  1 Reply Last reply
                  0
                  • A Abhijit Jana

                    i think he is confused himslef !!! he dont know what to do !!! :laugh: :laugh:

                    cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0

                    R Offline
                    R Offline
                    Rinki Mukheraji
                    wrote on last edited by
                    #12

                    simple i have two stirng string s1 = "a"; string s2 = "b"; when concatenate both string then show result c = s1 + s2; c = "\"a\"\"b\"" but i want to result c = "a""b";

                    A 2 Replies Last reply
                    0
                    • R Rinki Mukheraji

                      simple i have two stirng string s1 = "a"; string s2 = "b"; when concatenate both string then show result c = s1 + s2; c = "\"a\"\"b\"" but i want to result c = "a""b";

                      A Offline
                      A Offline
                      Abhijit Jana
                      wrote on last edited by
                      #13

                      Did you check my last post that i have give with your "same problem" Reply

                      cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0

                      1 Reply Last reply
                      0
                      • R Rinki Mukheraji

                        simple i have two stirng string s1 = "a"; string s2 = "b"; when concatenate both string then show result c = s1 + s2; c = "\"a\"\"b\"" but i want to result c = "a""b";

                        A Offline
                        A Offline
                        Abhijit Jana
                        wrote on last edited by
                        #14

                        Try to run this code !!!

                        string a="\"a\"";
                        string b = "\"b\"";
                        string c = a + b;
                        string d= "c="+c;
                        Response.Write(d);
                        

                        **Note : Use StringBuilder Rather Than String**

                        cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0

                        1 Reply Last reply
                        0
                        • R Rinki Mukheraji

                          i have two string "a" and "b" i want to concatenate string c = "a" "b" in asp.net my code is string p1 = "'" + b + '"' +' '; string p2 = "'" + c + '"' +' '; what result is coming c = "\p1\"\"p2"; what i want to result c = "p1" "p2"; how it will possible.

                          A Offline
                          A Offline
                          Abhijit Jana
                          wrote on last edited by
                          #15
                          string a="\"a\"";
                          string b = "\"b\"";
                          string c = a + b;
                          string d= "c="+c;
                          Response.Write(d);
                          

                          USer String Builder Rather Than String !!! :zzz: :zzz: :zzz:

                          cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0

                          R 1 Reply Last reply
                          0
                          • A Abhijit Jana
                            string a="\"a\"";
                            string b = "\"b\"";
                            string c = a + b;
                            string d= "c="+c;
                            Response.Write(d);
                            

                            USer String Builder Rather Than String !!! :zzz: :zzz: :zzz:

                            cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0

                            R Offline
                            R Offline
                            Rinki Mukheraji
                            wrote on last edited by
                            #16

                            that is same probleam.

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups