开发者

Show two values bindings in a dropdown list

I am trying to display the id and descritption of a document on a dropdown menu list but I don't know how to do it. So far it works fine but shows only reference document.

<asp:DropDownList ID="TrainingDocIDTextBox" runat="server"
DataSourceID="AccessDataSource2" DataTextField="ReferenceDocume开发者_StackOverflownt"
DataValueField="TrainingDocID"
onselectedindexchanged="TrainingDocIDTextBox_SelectedIndexChanged">
</asp:DropDownList>

Thanks!


You can't. But you can work around this by combining ReferenceDocument & TrainingDocID in the query, for example:

Select [TrainingDocID], [TrainingDocID] + ',' + [ReferenceDocument] as [RefrenceDoc] from ...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜