使用 HtmlGenericControl 强制转换即可
前台:
<div id= "Details " > </div>
后台:
if (((div)e.Row.FindControl( "Details ")) != null)
======================>
这可以找到吗?不可能
<div> 不是服务器控件,后台怎么找得到?
//前台
<div id= "Details " runat= "server "> </div>
//后台
if ((HtmlGenericControl)e.Row.FindControl( "Details ")) != null)