Ken H.
asked on
Combine the text from multiple text boxes into one text box and inject html formatting
Exactly as the title states. Below is a failed example from that you should understand what I am trying to do.
txtBox3.text = txtBox1.text & <br></br> & txtBox2.text
How can I make this scenario work?
txtBox3.text = txtBox1.text & <br></br> & txtBox2.text
How can I make this scenario work?
ASKER
That does not work. I've tried that as well.
I've also tried
Dim br As New HtmlGenericControl("br")
txtBox3.text = txtBox1.text & br & txtBox2.text
Anything in double quotes just shows up as text in the box and does not inject as html formatting.
I've also tried
Dim br As New HtmlGenericControl("br")
txtBox3.text = txtBox1.text & br & txtBox2.text
Anything in double quotes just shows up as text in the box and does not inject as html formatting.
ASKER
I managed to figure it out. Not sure if this is how you're supposed to do it but it works and the back and change view state functions are not giving me any kind of cross scripting error so i'll go with it.
Solution:
Dim br As New HtmlGenericControl(<br/>)
txtBox3 = txtBox1.Text & br.InnerHtml & txtBox2.Text
Solution:
Dim br As New HtmlGenericControl(<br/>)
txtBox3 = txtBox1.Text & br.InnerHtml & txtBox2.Text
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for newimagent's comment http:/Q_27398213.html#36972592
for the following reason:
Figured it out.
Accepted answer: 0 points for newimagent's comment http:/Q_27398213.html#36972592
for the following reason:
Figured it out.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Please give credit to RajkumaGS. His solution is much more lightweight and is a better fit.
ASKER
This works great. Thanks!
Thanks newimagent.
You can now accept my solution.
raj
You can now accept my solution.
raj
Thanks for the points. and glad as I can help you :)
Raj
Raj
txtBox3.text = txtBox1.text & "<br /><br />" & txtBox2.text
Raj