Using the Repeater

M

Mike Craig

Does anyone have a good suggestion/tutorial on how to access items
contained in a repeater in the onItemBound event?

I'm trying to dynamically generate a URL based on a selected item and
and finding that I cannot just cast e.item.dataitem to a DataRowView
object. Any suggestions?

Thanks,

Mike
 
R

Robert Koritnik

Well it depends what you provide as DataSource. So if casting to DataRowView
is not valid, you should cast to something that is.

Normally people set DataSet/DataTable to DataSource property. That's why
most of them use DataRowView casting in ItemDataBound event handler.
 
M

Mike Craig

I found that my code worked as I expected by using the ItemCreated
event. Hmm, go figure..
 

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,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top