Re: The Command event of dynamically loaded controls

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Donald Xie (donald_xie_at_msdn.nospam)
Date: 02/05/04


Date: Thu, 5 Feb 2004 09:24:00 +0800

Hi Steven,

Thanks so much for your suggestions and the sample code - they are exactly
the information I need.

The TreeView control is the more conventional, and the MSDN TOC in C# is
very elegant and certainly well proven. I will go through both to see which
is the best for this application.

The hierarchical data binding approach is in essense what I'm doing
manually, as the depth of each node is variable. However I suspect that it
also suffers the same render-twice problem if we want to do more than just
displaying the nodes and get their state on post back.

Best,
Donald Xie

"Steven Cheng[MSFT]" <v-schang@online.microsoft.com> wrote in message
news:8JbKxSx6DHA.3524@cpmsftngxa07.phx.gbl...
> Hi Donald,
>
>
> As for the situation you mentioned in the last reply, here is my
> suggestions on it:
> 1. If we manually build a "tree" programatically via a list of
ImageButtons
> or LinkButtons, I'm afraid there will cause some performance issues since
> every time page loaded , it need to create and add these dynamic controls
> so as to associate their states from viewstate, also register the event
> handler for them. This will be a large challenge to the serverside.
>
> 2. Would you like to have a try on the TreeView control in the Microsoft
> Internet Explorer WebControls? This treeview control has been added to the
> MS's web control collections and have detailed reference and tutorial in
> MSDN. Also, the IE webcontrols' source code is opened to public , you're
> feel to extend their existed functions. Here is some tech references and
> articls on the TreeView web control:
>
> #TreeView WebControl Reference
>
http://msdn.microsoft.com/library/en-us/dnaspp/html/aspnet-usingtreeviewiewe
> bcontrol.asp?frame=true
>
> And here is a test page I used to test dynamically add nodes when a
certain
> node is expanded. The treeview has
> 4 hierarchies and each contains 20 nodes. When a node is first time
> expanded or selected, it dynamically add its child nodes. Please have a
> look to see whether it possible for you to use this TreeView control.
>
> In addition, if you have the "Application Center Test" installed, you may
> try having a test on different approachs such as using TreeView or
manually
> add button lists so as to see the realtime performance. And here are
> another two tech articles, one is about the MSDN site's TreeView 's
> implementation in C#. I think they may be helpful to you,too.
>
> #Hierarchical Data Binding in ASP.NET
>
http://msdn.microsoft.com/library/en-us/dnaspp/html/aspn-hierdatabinding.asp
> ?frame=true
>
> #The MSDN Table of Contents in C#
>
http://msdn.microsoft.com/library/en-us/dnexxml/html/xml01152001.asp?frame=t
> rue
>
>
> Please check out the above suggestions. If you have any questions or if my
> suggestions not quite suitable for your situation, please feel free to
post
> here.
>
>
>
> Regards,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>


Quantcast