Hi,
I have the following code:
<asp:FormView ID="myFormView" runat="server" SkinID="DetailsFormview">
<ItemTemplate>
<table width="400">
<tr>
<td align="right">
<b>This is the label: </b>
</td>
<td align="left">
<asp:Label ID="myLabel" Text="Label Text"
runat="server" />
</td>
</tr>
</table>
</ItemTemplate>
</asp:FormView>
And in the code behind (VB.NET):
Protected Sub BindFormView()
Dim myLabel As Label = myFormView.FindControl("myLabel")
myLabel.Text = AnotherLabel.Text
End Sub
However, myLabel is always nothing. As you see, my formview has only an ItemTemplate. I tried setting hte DefaultMode to ReadOnly but I still have the same problem: myLabel = Nothing!
Any suggestion of what is wrong?
Thanks,
Ana