首页 新闻 会员 周边

跳转页面报错

0
悬赏园豆:20 [已解决问题] 解决于 2016-09-23 14:08

Server Error in '/WxOA' Application.


 

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) +8898062
   FineUI.CommonResourceHelper.AddContentToHead(Page page, String controlId, String msg) +117
   FineUI.CommonResourceHelper.RegisterCommonResource(Page page) +87
   FineUI.ResourceManager.Page_InitComplete(Object sender, EventArgs e) +30
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnInitComplete(EventArgs e) +9089182
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +604

 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1031

 

无法修改控件集合,因为控件包含代码块(即:“%”…))

 

 

 

该怎么解决呢

小样方块的主页 小样方块 | 初学一级 | 园豆:29
提问于:2016-09-22 19:45
< >
分享
最佳答案
0

想看看  控件包含代码块(即:“%”…)) 这些内容。。

 

收获园豆:15
雨點儿飞 | 菜鸟二级 |园豆:237 | 2016-09-23 09:47

<script type="text/javascript">
wx.config({
debug: false,
appId: '<%#appId %>',
timestamp: <%#timestamp %>,
nonceStr: '<%#nonceStr %>',
signature: '<%#signature %>',
jsApiList: [
'scanQRCode'
]
});
</script>

小样方块 | 园豆:29 (初学一级) | 2016-09-23 09:52

这个页面可以直接运行没问题,但跳转就报这个错误

小样方块 | 园豆:29 (初学一级) | 2016-09-23 09:53

@小样方块: <%#appId %> 你这样写是什么意思?? java小脚本里面变量命名应该和java里面一样,

你这样写命名不规范啊,或者你这个还是其他的什么??

你的#appId 是什么?

还有<%#appId %> 还有这样写是干嘛的

雨點儿飞 | 园豆:237 (菜鸟二级) | 2016-09-23 14:02

@小样方块: 假如想获取值在java小脚本里面,也应该是 <%= 值 %>

雨點儿飞 | 园豆:237 (菜鸟二级) | 2016-09-23 14:03
其他回答(1)
0

页面跳转,一般不是路径吗,看下是不是你路径哪弄错了

收获园豆:5
大黄人 | 园豆:641 (小虾三级) | 2016-09-22 21:08

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("http://jygroup.gnway.cc:8810/wxoa/ScanTest.aspx");
}

路径应该不会错的,代码里有好多这种跳转,就这一个报错

支持(0) 反对(0) 小样方块 | 园豆:29 (初学一级) | 2016-09-22 21:14
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册