i think i found a bug in asp.net, it stops compiling if it sees </script> anywhere in the code part of the file. i am using it because i am using response.write to append a javascript thing if certain conditions are met.
Printable View
i think i found a bug in asp.net, it stops compiling if it sees </script> anywhere in the code part of the file. i am using it because i am using response.write to append a javascript thing if certain conditions are met.
the reason for this i see is that it uses </script> to stop the code section..... what should i do?
ok i thought of something and it worked, i just did chr(60) for <
Hmm that seems odd. I dont see why that would cause it to freeze up. I mean it is just a string.
If you say
Response.Write ("<script = javascript>asdasd</script>")
I can't imagine why that would cause a problem.... it is just a string like any other string.
Maybe if you put
Response.write (<script = javascript>asdasd</script>)
then i could see why it would.
I use javascripts with response.write and it works fine. Like this:
Response.Write("<script = javascript>alert('This is a JavaScript')</script>")
well i did have it in quotations, i don't know why it wasn't working, anyways i did the chr(60) thing and it all works now
I've had the same problem. ASP.NET seems to do this when processing code in a <script runat="server"> block. <% ... %> blocks seem to work fine. Definitely smells like bug to me...