Hi,
My question is quite simple but I can't find the solution.
I have a FormView inside a div and, inside the formview, I have an
InsertItemTemplate. In this InsertItemTemplate, I have a Label that I
need to access in the code behind. My code is as follows:
<div id="myDiv" runat="server">
<asp:FormView ID="myFormView" runat="server"
SkinID="DetailsFormview">
<InsertItemTemplate>
<table width="400">
<tr>
<td align="right">
<b>Label: </b>
</td>
<td align="left">
<asp:Label ID="myLabel" runat="server" />
</td>
</tr>
</table>
</InsertItemTemplate>
</asp:FormView>
</div>
I tried the following:
Dim myLabel As Label = CType(myFormView.FindControl("myLabel"), Label)
But myLabel is always Nothing :(
How do I get the control then?
Thanks a lot,
Ana