Hi every one,
I have a admin page. i upload a image in image folder. I get a file name and save to database. Now i want to retrive the path based on my dropdown selection, as well as i want to show the image. How can i do? Is possible to use Listview control and bind?
I use this code get file path.
HttpPostedFile file = (HttpPostedFile)(fldAttachment.PostedFile);
if ((file != null) && (file.ContentLength > 0))
{
//check file type and size
if ((IsFileType(file) == false) || (file.ContentLength > 2097152))
{
if (fldAttachment.PostedFile.ContentType == "images/jpg")
{
string filename = Path.GetFullPath(fldAttachment.FileName);
//File save to server
fldAttachment.SaveAs(Server.MapPath("~/") + filename);
}
}
}
I want to get full path like
Foldername/filename.filetype
how to get?
Help me ...
Go to the complete details ...