Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2006

Tip: Looking for answers? Try searching our database.

.NET 2.0: DataLlist with nested LinkButton

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
R.A.M. - 26 Jun 2006 12:42 GMT
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/
Bhuvana - 26 Jun 2006 13:10 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.