converting sqlDatasource to typedList

Posts   
 
    
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 26-Oct-2007 11:35:00   

version 1.0.2005.1 final (self-servicing) VS2005 asp.net 2.0


Hiya,

I have some asp.net 2 sqlDataSource aspx that I'd prefer to convert to an llblGenPro typedList.

I don't have llblGenPro 2 yet, so I can't use llblGenPro datasource objects.

This is the current aspx:

<asp:DropDownList ID="DDL1" runat="server"  DataSourceID="SDS2" DataTextField="classLevelName" 
    DataValueField="classLevelId" AppendDataBoundItems="true" SelectedValue='<%# Bind("classLevelId") %>' > 

Ideally, I'd like to replace "DataSourceID" with a dataSource value that comes from the codeBehind,

eg, a public function in codeBehind which returns the typedList.

Is this possible?

Please let me know if i should clarify.

many thanks,

yogi

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 26-Oct-2007 11:41:11   

Ideally, I'd like to replace "DataSourceID" with a dataSource value that comes from the codeBehind,

In the appropriate event at code behind, set the DDL1.DataSource = mTypedList.