System.Web.UI.WebControls.FileUpload
-
when i m trying to upload image in database showing System.Web.UI.WebControls.FileUpload not path i wanted to store image by image name where is the problem
rizvan sivally
-
when i m trying to upload image in database showing System.Web.UI.WebControls.FileUpload not path i wanted to store image by image name where is the problem
rizvan sivally
sheemap wrote:
showing
System.Web.UI.WebControls.FileUpload
not pathWhatever way you tried to extract the file path was incorrect. As such, you no more get the full file path, just the
myFileUpload.FileName
. This is based on security reasons. Further, once file is uploaded, all you need to worry/know is where is file is uploaded - path of this location. This is defined by you and can be very easily stored in DB along with the filename to access later. Go through this article to learn on how to do it: MSDN: Uploading Files in ASP.NET 2.0[^] MSDN: FileUpload Class[^]Sandeep Mewara [My last article]: Server side Delimiters in ASP.NET[^]