Set Visible attribute in the node of HTML for ASPX
来源:互联网 发布:如何写淘宝试用报告 编辑:程序博客网 时间:2024/05/29 00:31
There are two columns in this GridView. The second one shows the status as a flag.
The type of value in the database is integer (or bit). The value of field IsConfigured set to 0 or 1
For the yesImage, you can use this: Visible='<%# Eval("IsConfigured")%>'
But, when I try to use Visible='<%# Not Eval("IsConfigured")%>' for the second image, unfortunately it does work.
Source Code:
<asp:TemplateField SortExpression="IsConfigured" >
<ItemTemplate>
<asp:Image ID="yesImage" runat="server" Visible='<%# CType(Eval("IsConfigured"),Boolean)%>'/>
<asp:Image ID="noImage" runat="server" Visible='<%# Not CType( Eval("IsConfigured"), Boolean) %>' />
</ItemTemplate>
</asp:TemplateField>
- Set Visible attribute in the node of HTML for ASPX
- White space is required before the attribute type in the declaration of attribute "t" for element "b
- Set Deepth for each node in forest
- What's the methodLists attribute of the structure objc_class for?
- How can i get hold of all of the visible items in my QListView?
- A Set of HTML Snippets for Sublime Text 2
- LinkedList---Delete Node in the Middle of Singly Linked List
- #372 Delete Node in the Middle of Singly Linked List
- Delete Node in the Middle of Singly Linked List
- a method to set the title of webpart in code
- Set the number format of cells in an Excel file
- 【DataStructure】Charming usage of Set in the java
- Counting-the-number-of-set-bits-in-an-integer
- Set CommandTimeout for a TableAdapter in the DataSet
- How to set bmp for your UserControl in the toolbox
- ERROR at line 1: ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
- Part 68 - What is the use of NonAction attribute in mvc
- for...in/for...of
- 用UML建模需要注意的问题
- Windows Mobile,DMProcessConfigXML 使用实例
- PowerDesigner UML 建模简介
- Java的main方法为什么是public static的?
- UML建模风格之包图
- Set Visible attribute in the node of HTML for ASPX
- Dillo 2.0 学习笔记二
- What is a UML Class Diagram?
- Course Map/Table of Contents
- JAVA知识点
- hibernate 处理数据库字段默认值
- linux下system()详解 (转)
- 出现一个异常希望大家能帮忙解决!
- 第一个项目--修改视频播放器和录像机的界面