FormViewコントローラー内にある「repScore」というリピーターコントローラーを見つけることができません。FormView内でリピーターを見つけることができません
これは私のコードです:
<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>
そして、これは背後に私のコードです:私は間違っ
protected void fwHotelDetails_DataBound(object sender, EventArgs e)
{
Repeater rep = (Repeater)fwHotelDetails.FindControl("repScore");
rep.DataSource = this.dtCriteria;
rep.DataBind();
}
何をしているのですか?
上記のコードが作業コードを反映するように編集されている場合は、あなたの投稿にもそれを言う必要があります。 – GFoley83