|
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.
|
|
|
|
|
Try this
string a="\"a\"";<br />
string b = "\"b\"";<br />
string c = a + b;
|
|
|
|
|
not possible !!!! its working !!!
my output is
"a""b"
now if you want
c="a""b"
then use
string d="c="+ c;<br />
response.write(d)
|
|
|
|
|
You are not clear about your problem . answer is given !!!!!
|
|
|
|
|
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.
|
|
|
|
|
no dost same probleam create
i want to result
c = "a" "b"
only for this
|
|
|
|
|
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...
Abhishek Sur
Web Developer
|
|
|
|
|
i m getting same probleam plz implement practically in asp.net
|
|
|
|
|
i think he is confused himslef !!! he dont know what to do !!!
|
|
|
|
|
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";
|
|
|
|
|
Did you check my last post that i have give with your "same problem" Reply
|
|
|
|
|
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
|
|
|
|
|
string a="\"a\"";
string b = "\"b\"";
string c = a + b;
string d= "c="+c;
Response.Write(d);
USer String Builder Rather Than String !!!
|
|
|
|