This is an ASP.Net 2.0 web app. The Item template looks like this, for reference:
<ItemTemplate>
<tr>
<td class="class1" align=center><a href='url'><img src="img.gif"></a></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field1") %></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field2") %></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field3") %></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field4") %></td>
</tr>
</ItemTemplate>
Using this code in the bowels of the codebehind:
foreach (RepeaterItem item in rptrFollowupSummary.Items)
{
string val = ((DataBoundLiteralControl)item.Controls[0]).Text;
Trace.Write(val);
}
I produce this:
<tr>
<td class="class1" align=center><a href='url'><img src="img.gif"></a></td>
<td class="class1">23</td>
<td class="class1">1/1/2000</td>
<td class="class1">-2</td>
<td class="class1">11</td>
</tr>
What I need is the data from Field1 and Field4
I can't seem to get at the data the way I would in say a DataList or a GridView, and I can't seem to come up with anything else on Google or quickly leverage this one to do what I want. The only way I can see to get at the data is going to be using a regex to go and get it (Because a man takes what he wants. He takes it all. And I'm a man, aren't I? Aren't I?).
Am I on the right track (not looking for the specific regex to do this; forging that might be a followup question ;) ), or am I missing something?