G
Guest
Good Day Folks,
I'm trying to dynamically create some Javascript code. The simplest form of
my asp.net code is shown below. Seems the compiler doesn't like the string
constant "</script>".
Any way around this ?
Thanks in advance
/Serge
Contents of "colorscheme.vb"
---------------------------------
<script runat="server">
Sub CreateColorSchemeJava()
Response.write("<script language=""Javascript"">" & vbcrlf)
Response.write("</script>" & vbcrlf) ' Error generated here.
End Sub
</script>
Contents of Main ASPX script.
<%@ Page Explicit="True" Language="VB" Debug="true"%>
<!--#include file="ColorScheme.vb"-->
<html>
<head>
<title></title>
<%
CreateColorSchemeJava()
%>
</head>
<body>
</body>
</html>
Compiler Error
----------------
String constants must end with a double quote. Error Line 6
Line 4:
Line 5: Response.write("<script language=""Javascript"">" & vbcrlf)
Line 6: Response.write("</script>" & vbcrlf)
Line 7:
Line 8: End Sub
I'm trying to dynamically create some Javascript code. The simplest form of
my asp.net code is shown below. Seems the compiler doesn't like the string
constant "</script>".
Any way around this ?
Thanks in advance
/Serge
Contents of "colorscheme.vb"
---------------------------------
<script runat="server">
Sub CreateColorSchemeJava()
Response.write("<script language=""Javascript"">" & vbcrlf)
Response.write("</script>" & vbcrlf) ' Error generated here.
End Sub
</script>
Contents of Main ASPX script.
<%@ Page Explicit="True" Language="VB" Debug="true"%>
<!--#include file="ColorScheme.vb"-->
<html>
<head>
<title></title>
<%
CreateColorSchemeJava()
%>
</head>
<body>
</body>
</html>
Compiler Error
----------------
String constants must end with a double quote. Error Line 6
Line 4:
Line 5: Response.write("<script language=""Javascript"">" & vbcrlf)
Line 6: Response.write("</script>" & vbcrlf)
Line 7:
Line 8: End Sub