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

  • Thread starter Thread starter Phil Corrin
  • Start date Start date
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
 
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

Back
Top