Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
'System.Data.DataRowView' 被添加到下拉列表中。如果应用的数据包含 5 条记录,那么它在列表帮助中出现 5 次......
将数据源的列名分配给下拉列表的 DataTextField 和 DataValueField。
例如
ddl.DataTextField = "TextColumnName"; ddl.DataValueField = "ValueColumnName"; ddl.DataSource = dt; ddl.DataBind();