关于异常处理

编程入门 行业动态 更新时间:2024-10-25 02:19:47
本文介绍了关于异常处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好,我是一个初学者,我只是想在页面中动态生成报告时知道这一点.由于数据库中的位值,也可能是由于NULL值,我无法将生成的报告导出到EXCEl或PDF ....此错误即将到来(类型为''CheckBox''的控件''gvDetails_ctl05_ctl01''必须放置在内部带有runat = server的表单标签.)....但是我的网格放置在内容占位符内,如果我在网格上插入表单标签....再次发生错误,说(页面不能包含更多内容)超过1个服务器标签). 您能给我发一些类似的简单代码吗?请帮帮我. 谢谢

Hi, I am a beginner and I just wanted to know that in a page while generating a report dynamically. Due to bit value in the database and might be due to NULL value, I am not able to export the generated report to EXCEl or PDF....this error is coming(Control ''gvDetails_ctl05_ctl01'' of type ''CheckBox'' must be placed inside a form tag with runat=server.)....but my grid in placed inside a content place holder and if i insert a form tag over the grid....again an error is occuring saying that (a page cant have more than 1 server tag). Can you mail me some similar simple code for this. Please help me out. Thanks

推荐答案

只需在cs文件中添加以下代码. Just Add following code at the cs file. public override void VerifyRenderingInServerForm(Control control) { /* Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. */ }

这将解决问题.

This will solve the problem.

更多推荐

关于异常处理

本文发布于:2023-07-21 11:13:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1176941.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:异常

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!