Frnds,
I am trying to create a photo gallery website.
In the web page i hav a DataList control which has Image control to display
existing images from database.
The problem is that images are not displayed.
The Code is as follows:

protected void Button1_Click(object sender, EventArgs e)
    {
        string imagefolder = "App_Data\\Images";
        string savepath;
        string savefile;
        if (FileUpload1.HasFile)
        {
            savepath = Path.Combine(Request.PhysicalApplicationPath,
imagefolder);
            savefile = Path.Combine(savepath, FileUpload1.FileName);
            FileUpload1.SaveAs(savefile);
            SqlDataSource1.Insert();
            //DataList1.DataBind();
            Label2.Text = "Successfully uploaded";

        }

    }
The images are getting saved into the destined folder but not displaying in
DataList.
Can anyone help me out?

Thanks a lot.

-- 
Alen

Just remember, there's a right way and a wrong way to do everything,
And the wrong way is to keep trying to make everybody else do it the right
way.

Reply via email to