saving path problem, please help.
-
Hi, I have a database (access) that contains a table GALLERY. Now i need while uploading a file to insert the path in this way to the db "~/photo/XXX.JPG" What i get right now is only the file's name. This is what i used for saving the path FileUpload1.SaveAs(Server.MapPath("~/photo/" + FileUpload1.FileName)); I've tried it with and without the Server.MapPath. The resault without the server.mappath was "The SaveAs method is configured to require a rooted path..bla bla bla" With the Server.MapPath it works but not the way i need it. as i said it inserts only the file's name to the DB. Can anyone please help me with that. Thank you, Basil.
-
Hi, I have a database (access) that contains a table GALLERY. Now i need while uploading a file to insert the path in this way to the db "~/photo/XXX.JPG" What i get right now is only the file's name. This is what i used for saving the path FileUpload1.SaveAs(Server.MapPath("~/photo/" + FileUpload1.FileName)); I've tried it with and without the Server.MapPath. The resault without the server.mappath was "The SaveAs method is configured to require a rooted path..bla bla bla" With the Server.MapPath it works but not the way i need it. as i said it inserts only the file's name to the DB. Can anyone please help me with that. Thank you, Basil.
Do not post to multiple forum :mad:
I know the language. I've read a book. - _Madmatt
-
Hi, I have a database (access) that contains a table GALLERY. Now i need while uploading a file to insert the path in this way to the db "~/photo/XXX.JPG" What i get right now is only the file's name. This is what i used for saving the path FileUpload1.SaveAs(Server.MapPath("~/photo/" + FileUpload1.FileName)); I've tried it with and without the Server.MapPath. The resault without the server.mappath was "The SaveAs method is configured to require a rooted path..bla bla bla" With the Server.MapPath it works but not the way i need it. as i said it inserts only the file's name to the DB. Can anyone please help me with that. Thank you, Basil.
-
What database are you using. If your database generate the problem on saving the file path. You can Encrypt the path and Then save to it.
If you can think then I Can.
-
If you are using Access DB then replace the \ to \\ and save it. the second method is to save in database is encrypt the path.
If you can think then I Can.
-
thanks for your answer, please tell me what do you mean by encrypting the path, you mean to encrypt the path string before inserting to the DB, how would i do that ?
-
If your Path Name have a Special Character that database is not support. Then you can use to convert this path to a another string by using diffrent encryption method.
If you can think then I Can.