.NET 2.0: DataList with nested LinkButton

R

R.A.M.

Hello,
Please help me in simple problem. I defined DataList, FooterTemplate
with nested asp:LinkButton, and command handler procedure:

<asp:DataList ID="BooksList" runat="server"
OnEditCommand="BooksList_Edit"
OnUpdateCommand="BooksList_Update"
OnCancelCommand="BooksList_Cancel"
OnDeleteCommand="BooksList_Delete">
...
<FooterTemplate>
</tbody>
<tfoot>
<tr align="justify">
<td>
<asp:LinkButton ID="BooksLisAdd"
runat="server" Text="Add" CommandName="Add"
OnCommand="BooksListAdd_Add" />
</td>
</tr>
</tfoot>
</table>
</FooterTemplate>
</asp:DataList>

protected void BooksListAdd_Add(object sender, CommandEventArgs e)
{
...
BooksListAdd.Visible = false; // HERE ERROR: "The
name 'BooksListAdd' does not exist in the current context."
}

Could you explain me please the error and how to solve it?
Thank you very much
/RAM/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top