G
Guest
Hi there, I have a brain block on finding a repeater item which matches a
field from the row of the datasource. If my datasource has a column called
'somethingid' i want to find the repeateritem which has somethingid=1 (there
will only be one)
so I have set up an iterator
foreach (RepeaterItem item in myrepeater.Items)
{
//below is what i am trying to do but this doesnt work, not sure of syntax
if (item.dataitem["somethingid"]=="1") {
do something
}
}
Not sure what syntax to use. I'm sure its pretty simple. Thank you.
field from the row of the datasource. If my datasource has a column called
'somethingid' i want to find the repeateritem which has somethingid=1 (there
will only be one)
so I have set up an iterator
foreach (RepeaterItem item in myrepeater.Items)
{
//below is what i am trying to do but this doesnt work, not sure of syntax
if (item.dataitem["somethingid"]=="1") {
do something
}
}
Not sure what syntax to use. I'm sure its pretty simple. Thank you.