I want to modify the text displayed for a databound radiobutton, so that each item is proceeded with A), B), and so on.
I assumed I could just call a function to do this (as I've done w/ templated databound controls in the past, like this:
(in the .ASPX file)
<asp:RadioButtonList ID="RadioButtonList3" runat="server" DataSourceID="SqlDataSource1"
DataTextField='<%# AppendOrderedLetter(CType(Container.DataItem, System.Data.DataRowView)) %> ' DataValueField="AnswerID">
(in the .VB file)
Function AppendOrderedLetter(ByRef row As System.Data.DataRowView) As String
Dim strAnswer As String = row.Item("AnswerText")
i += 1
Dim strChr As String = Chr(i)
strAnswer = strChr & ".) " & strAnswer
However, this throws the error: Compiler Error Message: BC30456: 'DataItem' is not a member of 'System.Web.UI.Page'.
I assume this is because the radio button isn't a "normal" templated control. How can achieve calling a function to create the DataTextField?
Note: I don't want to use the RadioButtonList3_DataBound event, because the radiobutton is nested within a formview, and I assume drilling down to it with the FindControl will be complicated.