ASP.NET ListBox - Get Values from Multiple Columns

ID
COMPANY NAME
CITY
  • Exotic Liquids
    1
    Exotic Liquids
    London
    1
  • New Orleans Cajun Delights
    2
    New Orleans Cajun Delights
    New Orleans
    2
  • Grandma Kelly's Homestead
    3
    Grandma Kelly's Homestead
    Ann Arbor
    3
  • Tokyo Traders
    4
    Tokyo Traders
    Tokyo
    4
  • Cooperativa de Quesos 'Las Cabras'
    5
    Cooperativa de Quesos 'Las Cabras'
    Oviedo
    5
  • Mayumi's
    6
    Mayumi's
    Osaka
    6
  • Pavlova, Ltd.
    7
    Pavlova, Ltd.
    Melbourne
    7
  • Specialty Biscuits, Ltd.
    8
    Specialty Biscuits, Ltd.
    Manchester
    8
  • PB Knäckebröd AB
    9
    PB Knäckebröd AB
    Göteborg
    9
  • Refrescos Americanas LTDA
    10
    Refrescos Americanas LTDA
    Sao Paulo
    10
  • Heli Süßwaren GmbH & Co. KG
    11
    Heli Süßwaren GmbH & Co. KG
    Berlin
    11
  • Plutzer Lebensmittelgroßmärkte AG
    12
    Plutzer Lebensmittelgroßmärkte AG
    Frankfurt
    12
  • Nord-Ost-Fisch Handelsgesellschaft mbH
    13
    Nord-Ost-Fisch Handelsgesellschaft mbH
    Cuxhaven
    13
  • Formaggi Fortini s.r.l.
    14
    Formaggi Fortini s.r.l.
    Ravenna
    14
  • Norske Meierier
    15
    Norske Meierier
    Sandvika
    15
  • Bigfoot Breweries
    16
    Bigfoot Breweries
    Bend
    16
  • Svensk Sjöföda AB
    17
    Svensk Sjöföda AB
    Stockholm
    17
  • Aux joyeux ecclésiastiques
    18
    Aux joyeux ecclésiastiques
    Paris
    18
  • New England Seafood Cannery
    19
    New England Seafood Cannery
    Boston
    19
  • Leka Trading
    20
    Leka Trading
    Singapore
    20
  • Lyngbysild
    21
    Lyngbysild
    Lyngby
    21
  • Zaanse Snoepfabriek
    22
    Zaanse Snoepfabriek
    Zaandam
    22
  • Karkki Oy
    23
    Karkki Oy
    Lappeenranta
    23
  • G'day, Mate
    24
    G'day, Mate
    Sydney
    24
  • Ma Maison
    25
    Ma Maison
    Montréal
    25
  • Pasta Buttini s.r.l.
    26
    Pasta Buttini s.r.l.
    Salerno
    26
  • Escargots Nouveaux
    27
    Escargots Nouveaux
    Montceau
    27
  • Gai pâturage
    28
    Gai pâturage
    Annecy
    28
  • Forêts d'érables
    29
    Forêts d'érables
    Ste-Hyacinthe
    29
Displaying 29 items.


In order to be able to access the data from the template at runtime, you need to use Literal controls to hold the data that needs to be accessed. In the ListBox1_SelectedIndexChanged event handler, you'll be able to access the data stored in the Literal controls.
obout.com 
obout.com Home 
News 
ListBox Home   
ListBox Home 
Examples - 56
Appearance - 2 
Live Styles 
Different Styles New 
Load on Demand - 3 
Load Items on Demand 
Load Items on Demand with Paging  
Virtual Scrolling  
Multi-Columns - 5 
Grid-like Multi-Columns  
Grid-like Multi-Columns & Tooltips New 
Multiple Rows and Columns  
Load multi Columns on Demand  
State Selector  
Items with Icons - 4 
Items with Icons  
Grid-like Multi-Columns with Icons  
Multiple Rows and Columns with Icons  
Icons from Database New 
Templates - 4 
Item Templates  
Header Templates  
Dynamic Header Templates New 
Populating with Data - 5 
Declarative  
SqlDataSource  
ObjectDataSource  
Generic Collections  
DataSet  
Item Selection - 6 
Single Item Selection  
Multi Item Selection  
Get Selected Item  
Get Selected Items  
Set Selected Item New 
Set Selected Items New 
Master/Detail - 3 
Master/Detail  
Unlimited Detail Levels  
Cascading ListBoxes  
Integration - 8 
Items with ASP.NET CheckBoxes  
Items with Obout CheckBoxes  
Select All ASP.NET CheckBoxes New 
Select All Obout CheckBoxes New 
CheckBoxes on Multiple Columns New 
RadioButtons inside ListBox  
ListBox inside Grid  
Validate with ASP.NET Validators New 
Settings - 3 
AutoPostback  
Height  
Width  
Server-Side API - 4 
Server-Side Events  
Enable / Disable  
Get Values from Multiple Columns New 
Tooltips New 
Client-Side API - 8 
Client-Side Events  
Add / Remove Items  
Add Multi-Column Items New 
Enable / Disable  
Get Selected Item  
Reset Selection New 
Select / Deselect All Items New 
Move Items New 
Appearance Customization - 1 
Aligning Items New 
Knowledge Base - 1 
Knowledge Base 
Documentation - 11 
Server-Side 
ListBox 
ListBoxClientSideEvents 
ComboBoxCssSettings 
ListBoxFooterTemlateContainer 
ListBoxHeaderTemlateContainer 
ListBoxItem 
ListBoxItemEventArgs 
ListBoxItemTemlateContainer 
ListBoxLoadingItemsEventArgs 
Client-Side 
Client-Side API 
ChangeLog 
Tutorials - 2 
Appearance - 1 
CSS Tutorial  
Configuration - 1 
Using the correct path