I’m not able to locate the repeater controller called ‘repScore’ which is located inside the FormView controller.
This is my code:
<asp:FormView runat="server" id="fwHotelDetails" DataKeyNames="id" OnDataBound="fwHotelDetails_DataBound" >
<ItemTemplate>
// (..) some code here which outputs some data
<asp:Repeater runat="server" id="repScore">
<ItemTemplate>
<span class="item"> <%# Eval("criteria") %>:</span>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:FormView>
And this is my code behind:
protected void fwHotelDetails_DataBound(object sender, EventArgs e)
{
Repeater rep = (Repeater)fwHotelDetails.FindControl("repScore");
rep.DataSource = this.dtCriteria;
rep.DataBind();
}
What am I doing wrong?
I cannot see that formView raises the DataBound event, didn’t you forget declare event handler?