Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best pattern for Parent/Children UI design?
Message
 
À
26/03/2009 17:31:31
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01391176
Message ID:
01391839
Vues:
51
>Ok, so now can you please help me learn the difference between the technique you just showed me (OnClick event on a LinkButton), vs. another suggestion I got from someone on StackOverFlow:
>
>They suggested the LinkButton also, but showed using CommandName="Select" on the LinkButton and then assigning OnItemCommand="CustomerList_ItemCommand" on the ListView itsself to handle the Command.
>
>Please tell me if I need to understand this technique, becuase from reading the help about the ListView control, it seems like there are several Commands that can be called. I just want to make sure I am learning the proper basics here.
>

Just two different ways of doing the same thing. The way they suggested may actually be a bit better since you get the built in functionality of being able to show the item "selected" when you click on it. I'd just set the CommandArgument like I showed in the other example - that makes it really easy to grab it in the ItemCommand event. You could also use OnSelectedIndexChanged event and look at the SelectedIndex to figure out which item was just selected. Again, just a different way of doing the same thing. I'd probably use ItemCommand though since it's easy to get the CommandArgument.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform