Hi
how I can insert this character in a string: &
I tried this:
example:
but it displays error end instruction was waitedQuote:
"Manolitos " & "&" & " Co."
Regards
Printable View
Hi
how I can insert this character in a string: &
I tried this:
example:
but it displays error end instruction was waitedQuote:
"Manolitos " & "&" & " Co."
Regards
Hmm - I don't get the error, but also why not just have it entirely enclosed in quotes.
Can you show us your code.
How aboutCode:Label1.Text = "Manolitos " & "&&" & " Co."
the text to insert a in a string is this:
(I need to replace .vb file and I need insert a new line code)Quote:
CType(sender, XRLabel).Text = "Page " & PageNumber.ToString() & " of " & PageCount.ToString()
regards
I need to insert this text (exact) in a string:
myString="CType(sender, XRLabel).Text = "Page " & "&" & "PageNumber.ToString()" &" &" & " of " & " & " & "PageCount.ToString() "
Output will be this:
CType(sender, XRLabel).Text = "Page " & PageNumber.ToString() & " of " & PageCount.ToString()
finally I've solved this issue:
and output:Quote:
myString = "CType(sender, XRLabel).Text = ""Página "" & PageNumber.ToString() & "" de "" & PageCount.ToString()"
CType(sender, XRLabel).Text = "Page " & PageNumber.ToString() & " of " & PageCount.ToString()
OK your problem isn't with the "&" it's with the quotes. VB will treat the "Page" as a keyword as it isn't inside the quotes.
EDIT - sorry, too slow in my typing !
That just illustrates why its a good idea to show your code at the start!