|
Posted - 11/26/2005 : 12:34:11
|
Good Morning, In my web page I've a datalist that is sourced by a database, the problem is that I want that one of the column of the datalist contain a dropdownbox that also is sourced by a table in the database.
<asp:DropDownList id="ComboTipoPartita" runat="server" DataValueField="IDTipoPartita" DataTextField="DescrizioneTipoPartita" DataSource="<% BindComboTipoPartita() %>" ></asp:DropDownList>
this seems impossible in aspx c# , the error tells :
" 'DataSource' property could be set just at runtime and cannot be declared "
I'm interested to solve my problem of insert a dropdownlist powered by a db inside a row of the datalist, how I can achieve this ??
Many thanks.
Eng. Antonio D'Ottavio www.etantonio.it/en
|
Country: Bahamas ~
Posts: 2 ~
Member Since: 11/26/2005 ~
Last Visit: 11/26/2005
|
Alert Moderator
|
|
|
|
Posted - 11/26/2005 : 12:37:39
|
As the error suggests, set the DataSource in the run-time in the datalist ItemDataBound event. Bye
Antonio |
Why not ?!? |
Country: Italy ~
Posts: 26 ~
Member Since: 10/21/2005 ~
Last Visit: 11/17/2008
|
Alert Moderator
|
|
|