Hi guys
trying to bind data to my RadioButtonList control,
but i'm getting this error:
aspx:Code:Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Databinding expressions are only supported on objects that have a DataBinding event. System.Web.UI.WebControls.ListItem does not have a DataBinding event. Source Error: Line 50: <td class="generalPadding" colspan="2"> Line 51: <asp:RadioButtonList ID="rblAddForms" runat="server"> Line 52: <asp:ListItem Text='<%#Eval("Name")%>' Value='<%#Eval("Idkey")%>' Enabled="true"></asp:ListItem> Line 53: </asp:RadioButtonList> Line 54: <asp:Repeater ID="rpAddForms" runat="server" OnItemDataBound="rpAddForms_OnItemDataBound"> Source File: /keithdesign/CustomControls/specinstructions_interior.ascx Line: 52
aspx.vb:Code:<asp:RadioButtonList ID="rblAddForms" runat="server"> <asp:ListItem Text='<%#Eval("Name")%>' Value='<%#Eval("Idkey")%>'></asp:ListItem> </asp:RadioButtonList>
Above is how i bind data to almost everything? what's the correct way toCode:Public Sub Populate_rblAddForms() Dim FormsList As New FormsList myParams.OrderBy = "name ASC" FormsList = FormsManager.GetList(myParams) 'bind data to rpAddForms repeater rblAddForms.DataSource = FormsList rblAddForms.DataBind() End Sub
bind to the RadioButtonList?
Shem



LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks