Response.Write("<Script Language='javascript'>window.open('UserInfoView.aspx?UserID="+HeGe.Items[i].Value.ToString()+"')</"+"Script>)";错误信息如下:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1026: ) expectedSource Error: Line 217: for(int i=0;i<HeGe.Items.Count;i++){
Line 218: if (HeGe.Items[i].Selected==true)
Line 219: Response.Write("<Script Language='javascript'>window.open('UserInfoView.aspx?UserID="+HeGe.Items[i].Value.ToString()+"')</"+"Script>)";
Line 220: }
Line 221: }
Source File: F:\IIS\design\teaqualification.aspx Line: 219 救救我呀,再弄不好毕业设计就要玩完啦
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1026: ) expectedSource Error: Line 217: for(int i=0;i<HeGe.Items.Count;i++){
Line 218: if (HeGe.Items[i].Selected==true)
Line 219: Response.Write("<Script Language='javascript'>window.open('UserInfoView.aspx?UserID="+HeGe.Items[i].Value.ToString()+"')</"+"Script>)";
Line 220: }
Line 221: }
Source File: F:\IIS\design\teaqualification.aspx Line: 219 救救我呀,再弄不好毕业设计就要玩完啦
解决方案 »
- .net正则表达式匹配,求助
- 一给就是100分: 如何动态增加控件
- 请问关于使用Dispose()释放清理得问题
- 求一个附加码代码,要求能显示不同大小的,且是图像传输的!谢谢
- 请帮忙,WEB中出现拒绝访问的错误
- <div>插入的文本如何换行?
- 简单的问题,送分!
- 错误处理:<customErrors mode="RemoteOnly" defaultredirect="customerrror.aspx"/>
- win2003下面使用excel提示拒绝访问,如何解决?
- 只是为了散分
- 不知道Cell的index,只知道SQL字段的名字,绑定后在data绑定事件中获得某datagrid的Cell值.
- 在下装的英文版vs2003,自动列出成员列表功能突然不好使了,将tools->option->Text Editor->All Languages->General->Auto list members
这样就对了撒 vs.net的错误提示 很多不对的!
------------------------------
</"+"Script>为什么要这样做?
是为了出现"危险的HTML"代码吗?其实大可不必的.你可如下写Response.Write("<Script Language='javascript'>window.open('UserInfoView.aspx?UserID=" + HeGe.Items[i].Value.ToString() + "')</Script>)";然后在web.config里面写如下语句 <!--设置页面不检测HTML语法-->
<pages enableSessionState = "true" validateRequest="false"/>
</system.web>
即可.
------------------------------
</"+"Script>为什么要这样做?
是为了出现"危险的HTML"代码吗?其实大可不必的.你可如下写Response.Write("<Script Language='javascript'>window.open('UserInfoView.aspx?UserID=" + HeGe.Items[i].Value.ToString() + "')</Script>)";然后在web.config里面写如下语句 <!--设置页面不检测HTML语法-->
<pages enableSessionState = "true" validateRequest="false"/>
</system.web>
即可.
不是这么回事,楼主应该是把代码写在了:
<script language="C#" runat="server"></script>里面了。再说那个东西只检测Request进来的东西。
Response.Write("<Script Language='javascript'>window.open('UserInfoView.aspx?UserID="+HeGe.Items[i].Value.ToString()+"')</"+"Script>");当然,楼主如果使用以下的格式,将会更清晰:Response.Write(string.Format("<script language='javascript'>Window.open('UserInfoView.aspx?UserID={0}')</script>",HeGe.Items[i].Value.ToString());