Hi All,
I have number of files in a directory. I want to upload all files at once using FTP through FTPWebRequest class in .Net 2.0. Since I am new to FTP and supporting classes in .Net. I don't know how to achieve this....
Is it possible to upload all files at once or every time do we have to create a separate request for each file.........
Thank in advance....
User Profile
Collapse
-
Help needed to Upload files using FTPwebRequest in .Net 2.0
-
Ok..Thank u for ur reply.... -
First, you split the string into string array using '\' and get its array length. Then get the penultimate string value.... Hope it works....Find below the example code..
var strPath = C:\Documents and Settings\BSPROG S\Desktop\DeVry \Previous work\BIS 440\ESSS_Case_S tudy.zip
var strPathArray = strPath.split(' \');
var strFileName = strPathArray[strPathArray.le ngth-1];
You can get the name in strFileName...Leave a comment:
-
That form uploads the image. I need to validate the image dimension before uploading. Is it possible.Leave a comment:
-
Validate Image Dimension
I want to validate the dimension of the uploading image. The dimension must be 289x66. Please find below my code.
var img = new Image(); img.src=documen t.forms[0].btnUploadLogo. value;
//btnUploadLogo is input file button ID...
if (img.width != 289 || img.height != 66)
{
// Error Message or Alert
}
But i am getting width and height as 0 and 0. I am using IE 7.0.
...
No activity results to display
Show More
Leave a comment: