关于异常处理 [英] About Exception Handling

查看:93
本文介绍了关于异常处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我是一个初学者,我只是想在页面中动态生成报告时知道这一点.由于数据库中的位值,也可能是由于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.


这篇关于关于异常处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆