G
Guest
Hi,
I have two web apps. Lets say main and admin for the sake of simplicity.
admin is a web app within main (as a subdomain). So the path for admin is
http://admin.main.com
within the admin application I have a file upload page and I wish to upload
the files to the main application. I have tried this application of MapPath
and it fails.
string myPath = "http://main.com"
bool allow = true;
txtUpload1.PostedFile.SaveAs(Server.MapPath(myPath,"MainDirectory", allow) +
"\\" + file1.Name);
I get this error message on compile:
No overload for method 'MapPath' takes '3' arguments
According to the documentation It can be overloaded with 3 arguments,
specifically for this purpose of creating a path to another application.
I have two web apps. Lets say main and admin for the sake of simplicity.
admin is a web app within main (as a subdomain). So the path for admin is
http://admin.main.com
within the admin application I have a file upload page and I wish to upload
the files to the main application. I have tried this application of MapPath
and it fails.
string myPath = "http://main.com"
bool allow = true;
txtUpload1.PostedFile.SaveAs(Server.MapPath(myPath,"MainDirectory", allow) +
"\\" + file1.Name);
I get this error message on compile:
No overload for method 'MapPath' takes '3' arguments
According to the documentation It can be overloaded with 3 arguments,
specifically for this purpose of creating a path to another application.