No, I don't think it is better to save the absolute path to a file in
the database. It is much more useful to store relative paths so that
the application can be moved as a whole later on.
The OP's problem originates from not being able to correctly resolve
the image path to the location on the server/system. Simple code like
the following should suffice:
---
string imgFolder = Server.MapPath("./pictures/general");
string imgPath = Convert.ToString(ds.Tables[0].Rows[0][6]);
// Check the path created here by using Debug or Response.Write.
imgPath = imgFolder + "/" + imgPath;
ImageButton1.ImageUrl = imgPath;
---
On Feb 24, 11:42 am, "m...@ni" <[email protected]> wrote:
> hi Afsal,hru?
>
> wel its better to save the picture name (along with full directory
> path) in the database,when you are insertng the information related to
> picture into the database,
> now what you are doing is, you first save the picture name in the
> database, and you retreive it very well,but when you give a path,it
> doesnt locate the picture,
> .
> snipped.