开发者

Show two values bindings in a dropdown list

开发者 https://www.devze.com 2023-03-06 12:56 出处:网络
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.

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

精彩评论

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

关注公众号