If the images are getting saved correctly, then you probably don't need to post the code that saves the images!
Could you post the markup and any codebehind for your DataList? On Thu, Mar 11, 2010 at 12:14 PM, Alen Alexander <[email protected]>wrote: > 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. >
