473,382 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

.NET 2.0: DataLlist with nested LinkButton

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/
Jun 26 '06 #1
1 1009
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

Jun 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: NETDeveloper | last post by:
Hi, I almost have my nested datagrid working properly. I created a datagrid on a user control and dropped that onto another datagrid. At first, I noticed when I was stepping through the code,...
5
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
2
by: Matthew | last post by:
I have a DataGrid nested within a DataList. The DataGrid generates LinkButtons with specific CommandName values. I cannot figure out how to trap this event. I need to know which DataGrid...
0
by: Patrik Persson | last post by:
Hello all I have got a problem with a nested repeater and the ItemCommand Event. I am adding handler for the ItemCommand and ItemBound. The ItemBound works perfect but I cant seem to get the...
0
by: Pat | last post by:
I have 3 Datagrid nested. Master Details Child The master has paging (And i'm using the paging inbuilt in the Datagrid) in the Master DataGrid you select a linkbutton(using commandname) and it...
2
by: Laura K | last post by:
I would like to create a nested datalist inside the selecteditemtemplate of a datalist. My hope is that when a user clicks on a link a set of child links is displayed. For example if the user...
1
by: Sue | last post by:
Web app: asp.net 2003, IE, IIS, VB top: system.page -first level: placeholder --second level: usercontrol ---third level: user control containing a datagrid Datagrid itemdatabound assigns:...
0
by: R.A.M. | last post by:
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"...
3
by: R.A.M. | last post by:
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"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.