Is it possible to display images in a ListView?

  • Thread starter Thread starter Ken Varn
  • Start date Start date
K

Ken Varn

I very new to ASP.NET, coming from Windows Forms development. One of the
things I have been trying to figure out is how to have the multi-select
functionality of a ListBox control that will also allow me to display a
unique Image with each item in the list. In Windows Forms I would do this
with a ListView control, but I have not figured out a way to do this in
ASP.NET. The closest thing I found was the DataView control, but it does
not allow multi-selection, and you have to place a 'select' control for each
list item. I just want the user to be able to click on the row to select
it, and use shift-click or ctrl-click to be able to select multiple rows.
Does anyone have info on how to do this?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
 
pretty simple html

<table id="multiselect1">
<tr><td>
<div style="overflow:auto;height=40pt;">
<img src="foo.gif"><input type=checkbox name="multiselect1" value=1>text
1<br>
<img src="foo.gif"><input type=checkbox name="multiselect1" value=2>text
2<br>
<img src="foo.gif"><input type=checkbox name="multiselect1" value=3>text
3<br>
<img src="foo.gif"><input type=checkbox name="multiselect1" value=4>text
4<br>
</div>
</td></tr>
</table>

-- bruce (sqlwork.com)
 
impossible with a listbox control, those only support text. (and there are
no ways to intercept shift-click/ctrl-click outside these controls)

If you don't mind switching up the design a bit of it, you could try a
checkboxlist, which you could get an image into (might take some "tweaking"
though). Or you could use a datagrid with a checkbox for each row, an
example of that can be found here.

http://aspnet.4guysfromrolla.com/articles/122602-1.2.aspx

Hope this helps get you started,
--Michael
 
Back
Top