<asp:ButtonColumn Text="Delete" HeaderText="DELETE" CommandName="Delete"  Visible=<%(bool)ISNControl.ISNQuery.IsShow()%>></asp:ButtonColumn>
改为:
<asp:ButtonColumn Text="Delete" HeaderText="DELETE" CommandName="Delete"  Visible="<%=(bool)IsShow()%>></asp:ButtonColumn>

解决方案 »

  1.   

    Parser Error 
    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Literal content ('<asp:ButtonColumn Text="Delete" HeaderText="DELETE" CommandName="Delete" Visible=') is not allowed within a 'System.Web.UI.WebControls.DataGridColumnCollection'.错误呀...
      

  2.   

    <asp:ButtonColumn Text="Delete" HeaderText="DELETE" CommandName="Delete"  Visible=<%(bool)ISNControl.ISNQuery.IsShow()%>></asp:ButtonColumn>
    -----------在aspx页面里不能够将服务器端控件的属性动态地用<%=%>语句赋值,因为在解析asp.net页面的时候,实质上,页面上的各个控件及其属性都已经实例化了,换句话说,你那个语句实际上没有效果,但可以在.cs文件中这么写。
    如button1.Visible=ISNControl.ISNQuery.IsShow();