Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > .NET 2.0: DataLlist with nested LinkButton

Reply
Thread Tools

.NET 2.0: DataLlist with nested LinkButton

 
 
R.A.M.
Guest
Posts: n/a
 
      06-26-2006
Hello,
Please help me in simple problem. I defined DataList, FooterTemplate
with nested asp:LinkButton, and command handler procedure:

<aspataList 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>
</aspataList>

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/
 
Reply With Quote
 
 
 
 
Bhuvana
Guest
Posts: n/a
 
      06-26-2006
Hi,

Instead of accessing like BooksListAdd.Visible = false; you could use
the below statement to hide the link button.

((LinkButton)sender).Visible = false;

Regards,
-Bhuvana
www.syncfusion.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET 2.0: DataList with nested LinkButton R.A.M. ASP .Net 0 06-21-2006 02:04 PM
.NET 2.0: DataList with nested LinkButton R.A.M. ASP .Net 0 06-12-2006 08:27 AM
Linkbutton does not look like a linkbutton Sathyaish ASP .Net 3 09-08-2005 09:41 AM
Linkbutton does not look like a linkbutton Sathyaish ASP .Net Datagrid Control 1 09-08-2005 08:44 AM
Datallist with 2 different <itemtemplates> aaapaul ASP .Net 3 06-21-2004 06:30 AM



Advertisments