asp.net - Image path is not store in table field as a string from fileupload -


i have use ascx contain fileupload control selected image path string in data base table filed using linq, , ascx used in dotnetnuke module page. there code have use in ascx.cs not image path fileupload control

        formviewrow row = formview1.row;         fileupload fileupload1 = (fileupload)row.findcontrol("fileupload1");          string filename = "";         string path;         if (fileupload1.hasfile)         {             filename = fileupload1.postedfile.filename;             path = server.mappath("desktopmodules/indiesstore/images/")+                            fileupload1.filename;             string onlyname = path.substring(path.lastindexof("\\") + 1);              ic.img = "desktopmodules/indiesstore/images/" + onlyname;          } 

there solution of this....?

ya worked directly code

    formviewrow row = formview1.row;     fileupload fileupload1 = (fileupload)row.findcontrol("fileupload1");      string filename = "";     if (fileupload1.hasfile)     {         filename = fileupload1.postedfile.filename;         ic.img = "desktopmodules/indiesstore/images/" + filename;      }  

so solved, user have place images on same folder on server , select images in fileupload there work properly.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -