Invisible Post-processing
I've used literal controls from time to time, especially when I need to generate some custom HTML and don't want the <span> tags around it which a label would generate. But I've never run into unexpected behavior before, literal has always simply output the string I feed it.
I'm outputting a string to a literal control. The string contains several values concatenated. Here's a snippet of the output code in an abstract class.
outputString += "<" + classTagName + getAttributes() + "/>";
In my implemented class I've defined this variable in the constructor
classTagName = "input type='radio'";
So how on earth can this produce the output...
<input ...lots of attributes... type="radio" />
The single quotes have become double quotes and the the attributes have been spliced into the middle of my string variable. Obviously, this isn't going to kill me, but I would like to know what's going on. (Before I do something that will kill my program.)
__________________
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
|