Etantonio Electronic
Welcome to the forum.
Username:
Password:
Save Password


Register
Select Language

Forgot your Password?
 
Active Topics | Active Polls | Members | Online Users | Avatar Legend | Search
Select Skin: 
 All Forums
 Informatics
 C#
 How insert a dropdownlist sourced by a dB in a dL
   All users can post NEW topics in this forum
   All users can reply to topics in this forum
Rating is not allowed for this topic.
 Printer Friendly
Author  Topic Next Topic: Regular expression that doesn''t recognize newline  

Dimitri

Status: offline

 Posted - 11/26/2005 :  12:34:11  Show Profile  Add Dimitri to Buddylist
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 

etantonio

Status: offline

 Posted - 11/26/2005 :  12:37:39  Show Profile  Visit etantonio's Homepage  Add etantonio to Buddylist
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  Go To Top Of Page
   Topic Next Topic: Regular expression that doesn''t recognize newline  
 Printer Friendly
Jump To:
 Image Forums 2001 This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000