I recently had a facepalm moment when I experienced an issue with a text property of a user control in my aspx file that had a custom property that included double quotes. Double quotes confused the compiler and made it believe that the ID property of my user control used in cs file didn’t exist.
After wasting some time on the wrong problem, it came down to escaping the double quotes. Aspx files are like XML and need to be treated like one in the text property of attributes used in the form controls.
To escape a double quote you need to use quot; e.g.
HeaderText="This is a "double quote""
will show up as below:
This is a “double quote”
Similarly for other such characters, use below ones: ampersand & => & single quotes ' => ' less than < => < greater than > => >