
May 18th, 2003, 03:47 AM
|
|
Registered User
|
|
Join Date: May 2003
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
objectlist items program
Hello,<br><br>I'm having a question about objectlist. Since I'm using my own method to create the objectlist, I can't set the properties but programming. So, does anyone know the program command to set the display titles, items etc as there's no reaction to the LabelField I set. Here's my own program.<br><br> sql = "Select * from authors where state = '" & SelectionList1.Selection.Text & "'"<br> dr = New SqlCommand(sql, conn)<br> conn.Open()<br> reader = dr.ExecuteReader()<br> While reader.Read()<br> values.Add(reader.Item("au_id").ToString + reader.Item("au_lname"))<br> End While<br> ObjectList1.DataSource = values<br> ObjectList1.DataMember = "authors"<br> ObjectList1.LabelField = "au_lname"<br> ObjectList1.DataBind()<br> conn.Close()<br> reader.Close()<br><br>Thank you so much!! <img border="0" src="/forum/emoticons/hop.gif" height="31" width="31" alt="hop" />
|