hi
im trying to upload a file with the help of fileupload control. im using following code to save the file in to the database
upPic.SaveAs(Server.MapPath("Images/") +
txtPrdId.Text.Trim() + ".jpg");//System.IO.Path.GetExtension(upPic.PostedFile.FileName));
the file gets saved perfectly..but when i try to display the same image somewher else, it shows a blank pic...
when i checked with the entry in the database it gets saves with my local machines path...for eg., c:/abc/Images/abc.jpg
when i enter a path Images/abc.jpg manually in the database it works fine...
what i can do to store the file in the same folders sub folder ie, Images folder?i dont want the c:/ n else path to be saved in the DB,
n when i try to save the file with following code
upPic.SaveAs(("Images/") +
txtPrdId.Text.Trim() + ".jpg");//System.IO.Path.GetExtension(upPic.PostedFile.FileName));
it gives me an error like a root directory needed to be defined.
What i can do? please help me..its urgent...
Thanks..