2008年10月6日

Control ‘dg’ of type 'GridView' must be placed inside a form tag with runat=server

摘要: 在GridView导入数据到Excel时,出现了如下错误: Control "dg" of type 'GridView' must be placed inside a form tag with runat=server 经过网上资料查找,原来是缺少该函数: public override void VerifyRenderingInServerForm(Control control... 阅读全文

posted @ 2008-10-06 10:19 小灰熊 阅读(328) 评论(0) 推荐(0)

ASP.net GridView隐藏列

摘要: 前台,设置DataKeyNames: ... 后台,获取数据: protected void dg_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if (e.... 阅读全文

posted @ 2008-10-06 09:25 小灰熊 阅读(391) 评论(0) 推荐(0)

【转】ASP.net2。0中解决无法获取 GridView 隐藏列值问题

摘要: --> 在 GridView/DetailsView 中如果 BoundField 的 Visible=false 时, 回发的时候无法此列的值(GridViewRow.Cells[cellIndex].Text将为空),网上很多朋友提出了各种各样的解决方案,这里整理一下,并提供示例。 未反射 GridView 类,不曾仔细阅读其源码,不知内部实现对于 BoundField(普通绑... 阅读全文

posted @ 2008-10-06 08:38 小灰熊 阅读(355) 评论(0) 推荐(0)

导航