Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best pattern for Parent/Children UI design?
Message
 
To
26/03/2009 17:31:31
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01391176
Message ID:
01391839
Views:
49
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform