[英]Export gridview to pdf asp.net c# web form
I have some problems to export gridview to pdf. 我在将gridview导出到pdf时遇到一些问题。
First , it shows error message 首先,它显示错误消息
Control 'ContentPlaceHolder1_GVAttendance' of type 'GridView' must be placed inside a form tag with runat=server.
类型为“ GridView”的控件“ ContentPlaceHolder1_GVAttendance”必须放置在带有runat = server的表单标记中。
and then I tried to googling and find these codes, 然后我尝试谷歌搜索并找到这些代码,
public override void VerifyRenderingInServerForm(Control control)
{
/* Verifies that the control is rendered */
}
but it show error message again 但它再次显示错误消息
Error 5 'My.Project.Control' is a 'namespace' but is used like a 'type'
错误5'My.Project.Control'是'命名空间',但像'类型'一样使用
How can i fix it? 我该如何解决?
Try Replacing the above code like this 尝试像这样替换上面的代码
public override void VerifyRenderingInServerForm(System.Web.UI.Control control)
{
/* Verifies that the control is rendered */
}
Hope this works. 希望这行得通。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.