C
christof
How to do it:
My page:
<aspataList ID="dataListRoleMembers" ...>
....
<FooterTemplate>
<asp:LinkButton ID="btnAddMember" runat="server"
OnClick="btnAddMember_Click">Add...</asp:LinkButton>
<asp:TextBox ID="txtAddMember" runat="server"></asp:TextBox>
</FooterTemplate>
</aspataList>
Code behind:
protected void btnAddMember_Click(object sender, EventArgs e)
{
TextBox txtMember =
(TextBox)dataListRoleMembers.FindControl("txtAddMember");
....
}
txtMember is null, FindControl don't get it for me - why?
I've tried also:
Control ctrl = dataListRoleMembers.FindControl("txtAddMember");
but result was the same, null
Thanks for help!
My page:
<aspataList ID="dataListRoleMembers" ...>
....
<FooterTemplate>
<asp:LinkButton ID="btnAddMember" runat="server"
OnClick="btnAddMember_Click">Add...</asp:LinkButton>
<asp:TextBox ID="txtAddMember" runat="server"></asp:TextBox>
</FooterTemplate>
</aspataList>
Code behind:
protected void btnAddMember_Click(object sender, EventArgs e)
{
TextBox txtMember =
(TextBox)dataListRoleMembers.FindControl("txtAddMember");
....
}
txtMember is null, FindControl don't get it for me - why?
I've tried also:
Control ctrl = dataListRoleMembers.FindControl("txtAddMember");
but result was the same, null
Thanks for help!