You can assign your reader to the DropDownList control's "DataSource "
property and call the DataBind() method. You must also set the
DropDownList's "DataTextFi eld" property to the column that you want to bind
to the control.
Here are some code pieces:
reader = command.Execute Reader();
ddList.DataSour ce = reader;
ddList.DataText Field = "money";
ddList.DataBind ();
<asp:DropDownLi st ID="ddList" Runat="Server">
Hope this helps,
Martha
"Srinivas" <an********@NO. JUNK.MAIL> wrote in message
news:e%******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,
My function returns a datareader object containing only one column of
datatype money. In asp.net I want to bind this datareader to a
dropdownlist. Can anyone suggest me how to do this with some sample code if possible.
Thanks
Srinivas