Can't retrieve text from DataListItem in DataList ...

P

Phil Corrin

.... but I can get the numerical index using the ItemIndex property.
Can anyone tell me how to get the text i.e. the data that is listed in
the datalist and that is output in the browser?

I've seen similar questions here but can't seem to find an answer.

I can get the ItemIndex by using:

myDataListItem.ItemIndex

and was hoping there would be a:

myDataListItem.Text

property.

Thanks,

Phil
 
J

Juno

Hi,

DataListItem has not Text property. DataListItem only contains controls,
so you may use DataListItem.Controls(index) to get the handle of that
control. And then use that control's relevent property to get Text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top