Reputation: 1409
I need to create a custom web control which will be a part of a class library. This custom web control implements the upload functionality. I have implemented this with a web user control where I have a fixed path to a page in the web project where the upload of files take place and it works just fine.
The created control in this class library is used in the web project. How do I post the uploaded file to a page, say SomeClass.cs, in the class library.
Thanks in advance.
Upvotes: 1
Views: 133
Reputation: 71
Pass the system path as a string overload?
string systemPathToFile = Server.MapPath("~/UploadedFiles/" + Path.Filename(fuFileUpload.Filename));
Upvotes: 1
Reputation: 3218
You can use a file upload control to post the file to a code-behind file.
Upvotes: 1