You can assign your reader to the DropDownList control's "DataSource"
property and call the DataBind() method. You must also set the
DropDownList's "DataTextField" property to the column that you want to bind
to the control.
Here are some code pieces:
reader = command.ExecuteReader();
ddList.DataSource = reader;
ddList.DataTextField = "money";
ddList.DataBind();
<asp:DropDownList ID="ddList" Runat="Server">
Hope this helps,
Martha
"Srinivas" <an********@NO.JUNK.MAIL> wrote in message
news:e%****************@TK2MSFTNGP09.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