Exforsys

Online Training

i want to upload bulk of files at a time

This is a discussion on i want to upload bulk of files at a time within the Microsoft .NET forums, part of the Programming Talk category; I have to download some files from server through asp.net 1.1 .I have to develop a form in ...


Go Back   Exforsys > Programming Talk > Microsoft .NET

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-09-2006, 11:15 AM
Junior Member
 
Join Date: Feb 2006
Posts: 16
Raman is on a distinguished road
Question i want to upload bulk of files at a time

I have to download some files from server through asp.net 1.1 .I have to develop a form in which we can download file from a dir on server to the my own pc .I have this kind of code
"HttpContext.Current.Response.AppendHeader("content-disposition", "attachment;filename=/doc/jak.doc")
'Response.ContentType = "application/vnd.ms-word"
response.writefile("jak.doc")"
this code asks wheather to open,save cancel
i do not want this ,I want direct download and also direct upload 10 to 20 file in one shot
Please help me out
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-13-2006, 02:02 AM
Junior Member
 
Join Date: Jan 2006
Posts: 21
Charith is on a distinguished road
Code for uploding 3 file same way u can upload 10
int mailcount;
mailcount=lstMail.Items.Count;
for(int i=0;i {

MailMessage mailMsg=new MailMessage();
mailMsg.From="PrimetravelsAdmin@primetravels.com";
//mailMsg.To="saju@centrumedia.com";
mailMsg.To=lstMail.Items.Text;
mailMsg.Subject=txtmsubject.Text;
mailMsg.Body=txtmessage.Text;
mailMsg.BodyFormat=MailFormat.Html;
string attach1 = null;
string attach2 = null;
string attach3 = null;

string strFileName = null;


if (inptAttachFile.PostedFile!=null)
{
HttpPostedFile attFile = inptAttachFile.PostedFile;
int attachFileLength = attFile.ContentLength;
if (attachFileLength > 0)
{
strFileName = Path.GetFileName(inptAttachFile.PostedFile.FileName);
inptAttachFile.PostedFile.SaveAs(Server.MapPath(strFileName));
MailAttachment attach = new MailAttachment(Server.MapPath(strFileName));
mailMsg.Attachments.Add(attach);
attach1 = strFileName;
}

}
if (inpAttachment2.PostedFile != null)
{
HttpPostedFile attFile = inpAttachment2.PostedFile;
int attachFileLength = attFile.ContentLength;
if (attachFileLength > 0)
{
strFileName = Path.GetFileName(inpAttachment2.PostedFile.FileName);
inpAttachment2.PostedFile.SaveAs(Server.MapPath(strFileName));
MailAttachment attach = new MailAttachment(Server.MapPath(strFileName));
mailMsg.Attachments.Add(attach);
attach2 = strFileName;
}
}
/* Attachment-3 Repeat previous steps */
if (inpAttachment3.PostedFile != null)
{
HttpPostedFile attFile = inpAttachment3.PostedFile;
int attachFileLength = attFile.ContentLength;
if (attachFileLength > 0)
{
strFileName = Path.GetFileName(inpAttachment3.PostedFile.FileName);
inpAttachment3.PostedFile.SaveAs(Server.MapPath(strFileName));
MailAttachment att
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Manage Your Time Wisely admin Career Advice 2 05-12-2006 07:03 AM
Microsoft .NET : List Files in a Directory techguru Microsoft .NET Tutorials and Articles 0 08-29-2005 07:25 AM
Combining files powerstar Visual Basic Tutorials 14 11-21-2004 06:40 AM
what does bulk collecter and Bulk Binding will do rite2sekhar Oracle Tutorials 1 10-08-2004 04:59 PM
Tips for moving to save money and time kalareddy Chit-Chat 1 06-21-2004 04:13 AM


All times are GMT -4. The time now is 01:06 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.