When we safe file path SQL server blank spaces in file file path

  • Thread starter Thread starter saqsaqPK
  • Start date Start date
S

saqsaqPK

Guest
Dear All Kindly Advise us . When we upload image and save path in database tabla. image path save with blank space. Kindly Advise us below is my code ,

string ext = Path.GetExtension(FileUpload1.FileName); // Checked Validation of file
if (ext == ".jpeg" || ext == ".png" || ext == ".jpg" || ext == ".gif" || ext == ".pdf")
{

string imgfile = Path.GetFileName(FileUpload1.PostedFile.FileName);
// FileUpload1.SaveAs(path + CombSerrial.Value + "_" + "installation " + "_" + imgfile);

FileUpload1.SaveAs (path + CombSerrial.Value + "_" + "Installation_Certificate" + "_" + imgfile);
string Installation_Certificate = (@"Images/Misc/Certificate/" + CombSerrial.Value + "_" + "installation" + "_" + imgfile);

In Database save image path :-

1616427.png



I am using SQL SERVER 2014 64bit

Continue reading...
 
Back
Top