List Info

Thread: C-Sharp (C#) Group: Re: How to add download and upload file in ASP.NET




C-Sharp (C#) Group: Re: How to add download and upload file in ASP.NET
user name
2006-09-15 15:13:48
Arindam ha scritto:

> You can try File Field which is an HTML Control.
> Hope this'll help you.
> Regards,
> Arindam

try this code to download
System.Web.HttpResponse r= HttpContext.Current.Response;
r.Clear();
r.ClearHeaders();
r.AppendHeader("Content-Disposition","atta
chments; filename=" +
fileName);
r.AppendHeader("Content-Length",bytesToSend.Leng
th.ToString());
r.ContentType=allegato.ContentType;
r.BinaryWrite(bytesToSend);
r.Flush();
r.End();


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )