Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i dynamicaly create an array of imagies?

Status
Not open for further replies.

passs

Programmer
Dec 29, 2003
170
RU
Hello everybody!

Can someone help me. I need to create array of imagies, i know the size of this array. But i need to create these imagies dynamicaly and let them exist until another request for their creation.
I'll try to explane another way.
Look i have a dropdownlist with several items, and each item have an explanation as a picture (image), which i have to show. If in this dropdownlist "ALL" selected, then i have to show all imagies. But this items depend on data in DB and so i can not use static number of imagies.
Maybe somebody know how to do that?
I'll be very very thankfull for any kind of help!

Thank you,
best regards,
Alexander
 
use Hashtable :
Hashtable ht=new Hashtable();
ht.Add("george",new Bitmap("file1.jpg");
ht.Add("john",new Bitmap("file2.jpg");

To retrieve the john's image:
if (ht.ContainsKey("john")
{
Bitmap img =(Bitmap) ht["john"];
}
...
ht=null;
-obislavu-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top