Yes, at the code to your code behind before you do assign the datasource
'get reference to your contentTemplate
'you can iterate your containing control list to find the device specific
'content template but as an example we will assume it is contained within
'a form called Form1
dim ddl as DropDownList
dll = Ctype(Form1.Controls(0).FindControl("Ddl"), DropDownList)
//now you bind your data and key/value this dropdown control
ddl.Datasource = ds;
ddl.DataTextField = "Name";
ddl.DataValueField = "Name";
jimmy q
All-Star
54108 Points
3578 Posts
Re: Dropdown lists & Postback!
Oct 24, 2007 01:43 PM|LINK
Yes, at the code to your code behind before you do assign the datasource
'get reference to your contentTemplate 'you can iterate your containing control list to find the device specific 'content template but as an example we will assume it is contained within 'a form called Form1 dim ddl as DropDownList dll = Ctype(Form1.Controls(0).FindControl("Ddl"), DropDownList) //now you bind your data and key/value this dropdown control ddl.Datasource = ds; ddl.DataTextField = "Name"; ddl.DataValueField = "Name";