I have to store images in
if i take image control then its hard for me to assign many images to same image control. so any idea, which will directly put image in
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Suthish NairPosted Feb 16, 2011, 2:54 AM
Michael XiePosted Feb 15, 2011, 1:48 PM
Jean PaulPosted Feb 14, 2011, 8:39 AM
Then, from the page_load event fetch the images and create an image control dynamically
and add to the panel Controls property..
Hope the following code could give more idea: (before running this add an img1.png to your web app)
protected void Page_Load(object sender, EventArgs e)
{
Panel panel = new Panel();
this.Page.Controls.Add(panel);
Image image = new Image();
image.ImageUrl = "~/img1.png";
panel.Controls.Add(image);
image = new Image();
image.ImageUrl = "~/img1.png";
panel.Controls.Add(image);
}