Ok, I know how to add text to a literal with themyliteral.Text = "blah blah"

but what if I have that and I want to add something before "blah blah"? what statement would I use?

Does my question make sense?

webcosmo
—
2011-09-02T17:02:49Z —
#2

do you mean setting html as text?

rarestone
—
2011-09-02T17:21:32Z —
#3

Nope, sorry I wasn't clear.

If the text value of the literal is

"Blah Blah" and I want it to be"This is my Blah Blah", how do I do that?

I know how to add text to the end, but how to add to the beginning.

FFCus
—
2011-09-03T02:19:24Z —
#4

^ Better suggestion. I would imagine that's a more efficient use of resources.

imaginekitty
—
2011-09-03T01:38:45Z —
#5

String.Format("This is my {0}", myLiteral.Text);

FFCus
—
2011-09-02T20:26:34Z —
#6

Assuming myLiteral.Text is Blah Blah

myLiteral.Text = "This is my " & myLiteral.Text

will output:

This is my Blah Blah

rarestone
—
2011-09-06T15:10:49Z —
#7

imaginekitty said:

String.Format("This is my {0}", myLiteral.Text);

Awesome!! Thank you

I had thought of doing it the way FFcus suggested but just somehow felt there must be a more elegant solution.

imaginekitty
—
2011-09-08T22:30:39Z —
#8

How long is the text in this literal?

rarestone
—
2011-09-08T14:08:20Z —
#9

Well, I found what I think is a better answer to my question, which is that the literal should be built using a string builder, then I can use the myStringBuilder.Insert to place the info at the beginning just before I write the stringbuilder to the literal.

But the other solutions are probably great for other cases!

rarestone
—
2011-09-19T13:36:17Z —
#10

imaginekitty said:

How long is the text in this literal?

Hi, Sorry it took so long for me to respond. The text isn't horribly long. It is the product detail, so it is just several paragraphs of information pulled from a few different places and put together/formatted.