Tapan Pattanaik
asked on
binding image control to dataset
I have a image control in my asp.net page. I am retrieving image paths and stored on dataset and want to bind to image control. (how will i do it without gridview)
example : if 10 image paths coming from dataset then it will automatically display 10 images in webpage. How will i do it.
example : if 10 image paths coming from dataset then it will automatically display 10 images in webpage. How will i do it.
ASKER
Hi Kishan,
can you share more in depths.
can you share more in depths.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to all.
First you have to do for loop, get one by one path from dataset; take some placeholder in aspx page like any table or panel and then in For loop create new object of image and add this image control to that placeholder.
This is psuedo code;
for (int i = 0; i < datasetCount; i++){
Image image = new Image ();
Image1.ImageUrl = path;
placeholder.Controls.Add(i
}
Hope this helps;
-Kishan