J
Jonathan Wood
I have an ASPX page with my C# code in a <script> block within the page
itself (not a code-behind file).
Within that code, the syntax highlighter indicates the following string
constant ends just before the "</script>", and the line produces the error
"Newline in constant." Changing that portion of the string to "<//script>"
causes the syntax highlighter to indicate a normal string.
string jScript = "<script>document.forms[0].submit();</script>";
Okay, so I would expect </script> to end my ASP.NET script block, but not
when it appears within a string constant.
Is this a bug, or am I prohibitted from having string constants that contain
"</script>"?
Thanks.
itself (not a code-behind file).
Within that code, the syntax highlighter indicates the following string
constant ends just before the "</script>", and the line produces the error
"Newline in constant." Changing that portion of the string to "<//script>"
causes the syntax highlighter to indicate a normal string.
string jScript = "<script>document.forms[0].submit();</script>";
Okay, so I would expect </script> to end my ASP.NET script block, but not
when it appears within a string constant.
Is this a bug, or am I prohibitted from having string constants that contain
"</script>"?
Thanks.