我如何从ListView控件中获取列的内容? [英] How tdo I get contents of a column from a listview control?
问题描述
< big>我已经使用ASP.NET创建了一个网站.
我正在使用listview控件显示数据库中的值.
列表视图中使用一个表(由行和列组成)来显示数据.
我在其中一列的单元格(即用户类型")中显示99或1作为值.
< b< u>我现在的问题是</u>:</b>
是否可以在同一个单元格中显示对应于单元格中值99的字符串("Admin")或对应于单元格中值1的("user")?
如何从单元格中提取值?
请帮忙吗?</big>
Jyoti
<big>I have created a web site using ASP.NET.
I am using listview control to display values from the database.
A table (consisting of rows and columns) is used inside the list view for displaying data.
I display either 99 or 1 as the values in the cells of one of the columns(namely "User Type").
<b><u>My qustion now is</u>:</b>
is it possile to display a string ("Admin") corrsponding to value 99 in the cell or ("user") corrsponding to value 1 in the cell, in the same cell?
How do i extract values from the cells ?
Please help?</big>
Jyoti
推荐答案
您可以使用SelectedValue
^ ].
这将确定键字段的值.
You can use theSelectedValue
property[^].
This will determine the value of the key field.
这篇关于我如何从ListView控件中获取列的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!