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 two string in asp.net

probleam concatenate two string in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
9 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.
  • R Offline
    R Offline
    Rinki Mukheraji
    wrote on last edited by
    #1

    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 A G 3 Replies 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
      #2

      Same question again ..... what is the problem??? let me tell you ... if you want a Quation Mark (") inside a string use \", if you want \ use \\ and use + to concatenate two strings... If you want "p1" "p2" assigned to c then write C="\"p1\" \"p2\"" Thats what u wanted I guess...:rose:

      Abhishek Sur

      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
        #3

        Your Same Post Check Yout Same Post[^]

        cheers, Abhijit

        R 1 Reply Last reply
        0
        • A Abhijit Jana

          Your Same Post Check Yout Same Post[^]

          cheers, Abhijit

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

          But it is not working

          A 1 Reply Last reply
          0
          • R Rinki Mukheraji

            But it is not working

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

            why not ? i have already give you the code . Check "Your Answer" post on your last thread. or you want some thing diffrent that you are not able to descruibe ?

            cheers, Abhijit

            R 1 Reply Last reply
            0
            • A Abhijit Jana

              why not ? i have already give you the code . Check "Your Answer" post on your last thread. or you want some thing diffrent that you are not able to descruibe ?

              cheers, Abhijit

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

              Ok Thanks for reminde me

              R 1 Reply Last reply
              0
              • R Rinki Mukheraji

                Ok Thanks for reminde me

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

                i have two command when two command in concatenate and run sigle command in asp.net e.g string a = "\"a\"" + ' '; string b = "\"b\""; string c = a + b; TextBox1.Text = c ProcessStartInfo startinfo = new ProcessStartInfo(); startinfo.FileName = TextBox1.Text; Process.Start(startinfo); that is same probleam when single command is run on the run window the execute succefully run

                A 1 Reply Last reply
                0
                • R Rinki Mukheraji

                  i have two command when two command in concatenate and run sigle command in asp.net e.g string a = "\"a\"" + ' '; string b = "\"b\""; string c = a + b; TextBox1.Text = c ProcessStartInfo startinfo = new ProcessStartInfo(); startinfo.FileName = TextBox1.Text; Process.Start(startinfo); that is same probleam when single command is run on the run window the execute succefully run

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

                  Rinki Mukheraji wrote:

                  when two command in concatenate and run sigle command in asp.net

                  you want to run two command a time ???? by adding them. :zzz: :zzz: Try to execute one by one.

                  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.

                    G Offline
                    G Offline
                    Gamzun
                    wrote on last edited by
                    #9

                    use StringBuilder it will ease your job

                    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