P
papaja
I have gollowing code:
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Pitanje")
%>'></asp:Label>
<asp:RadioButtonList ID="rblOdgovori" runat="server" DataSourceID='<%
PristupRezultatima.DajOdgovoreNaPitanje(Eval("PitanjeID")) %>'
DataTextField='<%#Eval("Odgovor") %>'
DataValueField='<%#Eval("OdgovorID") %>'>
</asp:RadioButtonList>
</ItemTemplate>
</asp:Repeater>
I set DataSource of Repeater1 in code behind file. I tried to set
DataSource to RadioButtonList the way I showed in code. I tried to call
method DajOdgovoreNaPitanje from class PristupRezultatima. This method
requires parameter "PitanjeID". So I tried passing this value using
Eval("PitanjeID").
DataSource of Repeater has column "PitanjeID". Sill, I'm getting error:
DataBinding: 'System.Data.DataRowView' does not contain a property with
the name 'Odgovor'. Where am I wrong?
Procedure DajOdgovoreNaPitanje returns column "Odgovor". Please help
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Pitanje")
%>'></asp:Label>
<asp:RadioButtonList ID="rblOdgovori" runat="server" DataSourceID='<%
PristupRezultatima.DajOdgovoreNaPitanje(Eval("PitanjeID")) %>'
DataTextField='<%#Eval("Odgovor") %>'
DataValueField='<%#Eval("OdgovorID") %>'>
</asp:RadioButtonList>
</ItemTemplate>
</asp:Repeater>
I set DataSource of Repeater1 in code behind file. I tried to set
DataSource to RadioButtonList the way I showed in code. I tried to call
method DajOdgovoreNaPitanje from class PristupRezultatima. This method
requires parameter "PitanjeID". So I tried passing this value using
Eval("PitanjeID").
DataSource of Repeater has column "PitanjeID". Sill, I'm getting error:
DataBinding: 'System.Data.DataRowView' does not contain a property with
the name 'Odgovor'. Where am I wrong?
Procedure DajOdgovoreNaPitanje returns column "Odgovor". Please help