sscript+="<script language=Javascript>"
sscript+=" window.opener.location.reload();"
sscript+=" window.close();"
sscript+=" </script>"
response.write(sscript)
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误信息: BC30648: 字符串常数必须以双引号结束。
源错误:
行 213: sscript+=" window.opener.location.reload();"
行 214: sscript+=" window.close();"
行 215: sscript+=" </script>"
行 216:
行 217: response.write(sscript)
12 个解决方案
#1
显示详细的编译器输出:
C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\ssgz\91446f84\5cb44ac7\zfq-bhxy.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\ssgz\91446f84\5cb44ac7\assembly\dl2\6aab5cbb\009c6b92_c6a3c401\ssgz.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.dll" /D:DEBUG=1 /debug+ "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.0.vb"
Microsoft (R) Visual Basic .NET 编译器版本 7.10.3052.4
用于 Microsoft (R) .NET Framework 版本 1.1.4322.573
版权所有 (C) Microsoft Corporation 1987-2000。保留所有权利。
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.0.vb(678) : error BC30289: 语句不能出现在方法体内。假定已到达方法末尾。
Public Sub New()
~~~~~~~~~~
c:\inetpub\wwwroot\ssgz\class2.aspx(215) : error BC30648: 字符串常数必须以双引号结束。
sscript+="
~~
C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\ssgz\91446f84\5cb44ac7\zfq-bhxy.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\ssgz\91446f84\5cb44ac7\assembly\dl2\6aab5cbb\009c6b92_c6a3c401\ssgz.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.dll" /D:DEBUG=1 /debug+ "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.0.vb"
Microsoft (R) Visual Basic .NET 编译器版本 7.10.3052.4
用于 Microsoft (R) .NET Framework 版本 1.1.4322.573
版权所有 (C) Microsoft Corporation 1987-2000。保留所有权利。
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.0.vb(678) : error BC30289: 语句不能出现在方法体内。假定已到达方法末尾。
Public Sub New()
~~~~~~~~~~
c:\inetpub\wwwroot\ssgz\class2.aspx(215) : error BC30648: 字符串常数必须以双引号结束。
sscript+="
~~
#2
試著改成:
行 213: sscript+=" window.opener=null;"
行 214: sscript+=" window.close();"
行 215: sscript+=" </script>"
#3
c#中后台的javascript 注册到前台要
this.Page.RegisterStartupScript的
this.Page.RegisterStartupScript的
#4
给个例子,提示一下你
StringBuilder nmm_sbScript = new StringBuilder("");
nmm_sbScript.Append("<Script language=javascript>");
string nmm_strTmp = this.tbDocNumber.UniqueID.Split(':')[0];
nmm_sbScript.Append("function getPreFwwgName()");
nmm_sbScript.Append("{");
nmm_sbScript.Append("return \""+nmm_strTmp+"\";");
nmm_sbScript.Append("}");
nmm_sbScript.Append("</script>");
this.Page.RegisterStartupScript("getPreFwwgName",nmm_sbScript.ToString());
StringBuilder nmm_sbScript = new StringBuilder("");
nmm_sbScript.Append("<Script language=javascript>");
string nmm_strTmp = this.tbDocNumber.UniqueID.Split(':')[0];
nmm_sbScript.Append("function getPreFwwgName()");
nmm_sbScript.Append("{");
nmm_sbScript.Append("return \""+nmm_strTmp+"\";");
nmm_sbScript.Append("}");
nmm_sbScript.Append("</script>");
this.Page.RegisterStartupScript("getPreFwwgName",nmm_sbScript.ToString());
#5
到底应该怎么修改呢
#6
看起来没什么问题
看看sub new 的代码?
看看sub new 的代码?
#7
可是根本没有什么sub new呀
#8
用RegisterStartupScript试试
#9
加在哪儿
#10
dim sscript as string
sscript+="<script language=Javascript>"
sscript+=" window.opener.location.reload();"
sscript+=" window.close();"
sscript+=" </script>"
response.write(sscript)
------------------
response.write("<script language='javascript'>window.opener.location.reload();<" & chr(47) & "script>")
response.write("<script language='javascript'>window.close();<" & chr(47) & "script>")
sscript+="<script language=Javascript>"
sscript+=" window.opener.location.reload();"
sscript+=" window.close();"
sscript+=" </script>"
response.write(sscript)
------------------
response.write("<script language='javascript'>window.opener.location.reload();<" & chr(47) & "script>")
response.write("<script language='javascript'>window.close();<" & chr(47) & "script>")
#11
谢谢了,有劳大家了
#12
请大家帮忙到这个贴子看一下
#1
显示详细的编译器输出:
C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\ssgz\91446f84\5cb44ac7\zfq-bhxy.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\ssgz\91446f84\5cb44ac7\assembly\dl2\6aab5cbb\009c6b92_c6a3c401\ssgz.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.dll" /D:DEBUG=1 /debug+ "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.0.vb"
Microsoft (R) Visual Basic .NET 编译器版本 7.10.3052.4
用于 Microsoft (R) .NET Framework 版本 1.1.4322.573
版权所有 (C) Microsoft Corporation 1987-2000。保留所有权利。
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.0.vb(678) : error BC30289: 语句不能出现在方法体内。假定已到达方法末尾。
Public Sub New()
~~~~~~~~~~
c:\inetpub\wwwroot\ssgz\class2.aspx(215) : error BC30648: 字符串常数必须以双引号结束。
sscript+="
~~
C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\ssgz\91446f84\5cb44ac7\zfq-bhxy.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\ssgz\91446f84\5cb44ac7\assembly\dl2\6aab5cbb\009c6b92_c6a3c401\ssgz.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.dll" /D:DEBUG=1 /debug+ "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.0.vb"
Microsoft (R) Visual Basic .NET 编译器版本 7.10.3052.4
用于 Microsoft (R) .NET Framework 版本 1.1.4322.573
版权所有 (C) Microsoft Corporation 1987-2000。保留所有权利。
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ssgz\91446f84\5cb44ac7\wegatfce.0.vb(678) : error BC30289: 语句不能出现在方法体内。假定已到达方法末尾。
Public Sub New()
~~~~~~~~~~
c:\inetpub\wwwroot\ssgz\class2.aspx(215) : error BC30648: 字符串常数必须以双引号结束。
sscript+="
~~
#2
試著改成:
行 213: sscript+=" window.opener=null;"
行 214: sscript+=" window.close();"
行 215: sscript+=" </script>"
#3
c#中后台的javascript 注册到前台要
this.Page.RegisterStartupScript的
this.Page.RegisterStartupScript的
#4
给个例子,提示一下你
StringBuilder nmm_sbScript = new StringBuilder("");
nmm_sbScript.Append("<Script language=javascript>");
string nmm_strTmp = this.tbDocNumber.UniqueID.Split(':')[0];
nmm_sbScript.Append("function getPreFwwgName()");
nmm_sbScript.Append("{");
nmm_sbScript.Append("return \""+nmm_strTmp+"\";");
nmm_sbScript.Append("}");
nmm_sbScript.Append("</script>");
this.Page.RegisterStartupScript("getPreFwwgName",nmm_sbScript.ToString());
StringBuilder nmm_sbScript = new StringBuilder("");
nmm_sbScript.Append("<Script language=javascript>");
string nmm_strTmp = this.tbDocNumber.UniqueID.Split(':')[0];
nmm_sbScript.Append("function getPreFwwgName()");
nmm_sbScript.Append("{");
nmm_sbScript.Append("return \""+nmm_strTmp+"\";");
nmm_sbScript.Append("}");
nmm_sbScript.Append("</script>");
this.Page.RegisterStartupScript("getPreFwwgName",nmm_sbScript.ToString());
#5
到底应该怎么修改呢
#6
看起来没什么问题
看看sub new 的代码?
看看sub new 的代码?
#7
可是根本没有什么sub new呀
#8
用RegisterStartupScript试试
#9
加在哪儿
#10
dim sscript as string
sscript+="<script language=Javascript>"
sscript+=" window.opener.location.reload();"
sscript+=" window.close();"
sscript+=" </script>"
response.write(sscript)
------------------
response.write("<script language='javascript'>window.opener.location.reload();<" & chr(47) & "script>")
response.write("<script language='javascript'>window.close();<" & chr(47) & "script>")
sscript+="<script language=Javascript>"
sscript+=" window.opener.location.reload();"
sscript+=" window.close();"
sscript+=" </script>"
response.write(sscript)
------------------
response.write("<script language='javascript'>window.opener.location.reload();<" & chr(47) & "script>")
response.write("<script language='javascript'>window.close();<" & chr(47) & "script>")
#11
谢谢了,有劳大家了
#12
请大家帮忙到这个贴子看一下