[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Jurij P

10/9/2002 3:45:00 PM

Has anyone tried to fill the SelectionList From database? When i try to do
this, .selection or .selectedIndex doesn+t work ( always is -1)

Please Help!


for i=0 to NumRows-1
arrayT.Add(New
Tasks(MyDataset.Tables(0).Rows(i).Item("categoryname")+" -
"+MyDataset.Tables(0).Rows(i).Item("name"),
MyDataset.Tables(0).Rows(i).Item("TaskID") ))

Next i
TaskList.DataSource = arrayT
TaskList.DataBind()

...
<mobile:SelectionList id="TaskList" runat="server" SelectType="DropDown"
DataTextField="TaskID" DataValueField="TaskID">
</mobile:SelectionList>

...

ListTask.SelectedIndex (if I don't use DB it works
normally)