Click here to Skip to main content
15,867,308 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questioncreate outlook meeting request in asp.net Pin
bokuceres17-Jan-08 16:14
bokuceres17-Jan-08 16:14 
GeneralRe: create outlook meeting request in asp.net Pin
Sun Rays17-Jan-08 19:11
Sun Rays17-Jan-08 19:11 
GeneralRe: create outlook meeting request in asp.net Pin
bokuceres17-Jan-08 22:38
bokuceres17-Jan-08 22:38 
QuestionImplement Moving content/text in website. Pin
$unil Dhiman17-Jan-08 15:37
$unil Dhiman17-Jan-08 15:37 
GeneralRe: Implement Moving content/text in website. Pin
$unil Dhiman17-Jan-08 15:42
$unil Dhiman17-Jan-08 15:42 
GeneralRe: Implement Moving content/text in website. Pin
Sun Rays17-Jan-08 19:18
Sun Rays17-Jan-08 19:18 
GeneralRe: Implement Moving content/text in website. Pin
$unil Dhiman17-Jan-08 19:44
$unil Dhiman17-Jan-08 19:44 
Questiondowloading multiple files from remote server to client's local drive [modified] Pin
MikeMort17-Jan-08 11:52
MikeMort17-Jan-08 11:52 
I have an ASP.NET site that displays a dataGrid which lists word Documents available to the client. Each Document has a hyperlink that allows the user to click and download/print... the files one at a time.

My objective is to have user select multiple documents be downloaded automatically (without user intervention) to the clients pc. I have added a Checkbox on each gridrow. The user can select a series of document for download by checking the row's checkbox. A download button is placed below the grid. Clicking this button will start the download process. The snipett below is from this button_click routine.

I have used weblient as well as FTPClient and They work, but they download the files to local drive on the web server since they are running on the web server.

The solution I've come up with is to run the file download process on the client side. I have used the response.addheader and response.writefile which successfully download a single file to the client pc. But the draw back is that it requires the user interaction responding to the save dialog box. Also it can't itirate through all selected files since response.end is used.

The logic is to dynamicall create a javascript on the client side using row specific filename and path and download each file.

I need to instantiate either a FTPclass (that I have compiled and tested on the serverside) in a vb or javascript on the client side. I also have access to third party FTP DLL objects that I could use.

Here is the snipett:


For Each dgItem In grid.Items

chksel = dgItem.FindControl("CB1")

If chksel.Checked Then

rdate = CType(dgItem.FindControl("datereceived"), Label).Text.Trim()

Dim d As String

d = rdate.Year & rdate.Month & rdate.Day

Dim sFile As String = CType(dgItem.FindControl("documentLink"), HyperLink).Text.ToString()

strLink = "c:/mydocs/" & Me.GetDocumentPath(jobID)

Response.Write("")

'Response.Write("var ftp = new FtpClient('
ftp.comapny.com');")

'Response.Write("ftp.connect;")

'Response.Write("ftp.login('ftp_user','ftp_pwd');")

'Response.Write("ftp.chdir('mydocs');")

'Response.Write("ftp.chdir(pin);")

'Response.Write("ftp.chdir(d);")

'Response.Write("ftp.get('C:\Documents',sfile);")

'Response.Write("ftp.quit();")

Response.Write("alert ('" & sFile & "');")

Response.Write("")


chksel.Checked = False

chksel.Visible = False
End If

Next



Note: pin is passed to the function and has a value that identifies the user.

I have comment the area where the logic is for FTPclient and have added Alert to display teh dynamic name of the files for selected for download.

The alert does shows the filenames as intended.

My issue is how to instantiate the FTPclient class in javascript. Is there anyother method I can use?

Thanks in advance,

Mike

modified on Saturday, January 19, 2008 12:30:09 PM

QuestionUser access and options validation Pin
emiaj17-Jan-08 7:01
emiaj17-Jan-08 7:01 
GeneralRe: User access and options validation Pin
pmarfleet17-Jan-08 8:37
pmarfleet17-Jan-08 8:37 
GeneralRe: User access and options validation Pin
emiaj17-Jan-08 14:25
emiaj17-Jan-08 14:25 
GeneralRe: User access and options validation Pin
bokuceres17-Jan-08 16:22
bokuceres17-Jan-08 16:22 
GeneralRe: User access and options validation Pin
emiaj18-Jan-08 2:53
emiaj18-Jan-08 2:53 
GeneralASP.NET projects without IIS Pin
Diego F.17-Jan-08 6:51
Diego F.17-Jan-08 6:51 
GeneralRe: ASP.NET projects without IIS Pin
pmarfleet17-Jan-08 8:31
pmarfleet17-Jan-08 8:31 
QuestionExcelSheet Problem Pin
rishi.kasnia17-Jan-08 4:50
rishi.kasnia17-Jan-08 4:50 
GeneralRe: ExcelSheet Problem Pin
Paddy Boyd17-Jan-08 5:28
Paddy Boyd17-Jan-08 5:28 
GeneralRe: ExcelSheet Problem Pin
rishi.kasnia17-Jan-08 17:59
rishi.kasnia17-Jan-08 17:59 
GeneralRe: ExcelSheet Problem Pin
Paddy Boyd17-Jan-08 21:23
Paddy Boyd17-Jan-08 21:23 
GeneralRe: ExcelSheet Problem Pin
rishi.kasnia17-Jan-08 23:10
rishi.kasnia17-Jan-08 23:10 
GeneralCheck installed software Pin
C. L. Phillip17-Jan-08 3:17
C. L. Phillip17-Jan-08 3:17 
GeneralRe: Check installed software Pin
Vasudevan Deepak Kumar17-Jan-08 3:51
Vasudevan Deepak Kumar17-Jan-08 3:51 
GeneralRe: Check installed software Pin
C. L. Phillip17-Jan-08 20:32
C. L. Phillip17-Jan-08 20:32 
GeneralRe: Check installed software Pin
N a v a n e e t h17-Jan-08 21:38
N a v a n e e t h17-Jan-08 21:38 
Questionmessage box problem Pin
Pankaj Garg17-Jan-08 3:07
Pankaj Garg17-Jan-08 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.