Hi All,
I am working in a enviroment were everyone has access to all the same servers and files and they are mapped on everyones computer, but the mapping may be diffrent. What I want to do is use the fileUpload control to have the user find the file and then I want to put the files path and file name into a variable. I dont want the actual file, just its path. Can someone help me out with this? or should i just create a control myself? Back in vb6, i would have used commondialogbox, but i havent looked at doing it that way here and dont know if you still can, but i seen the nifty little fileupload control and thought I could probably just use it.
I am using vb.net2005
Thanks in advance,
Charles
Charles pPosted Aug 28, 2008, 12:41 PM
sorry, i must be slow today, but i dont understand how to implement this. is this vb.net code?
does that use the file upload user control? my file upload control is named FUsample. so how do i get the path from that user control after the user selects a file?
Praveen VenugopalPosted Aug 27, 2008, 2:31 AM
hi,
HttpFileCollection files = Request.Files;
HttpPostedFile file = files[p];
string c = System.IO.Path.GetFullPath(String.Format(file.FileName));
if(post==helpful)
{
Mark As Answer;
}