-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Prasanna_kakanoor
Message 3 in Discussion

Hi,


I think u did mistake in ContentType. Here is the working code for file download.

        Response.Clear()
        Response.ContentType = "application/octet-stream"
        Response.AddHeader("Content-Disposition", "attachment; filename=\"" + 
strFileName + "\"")
        Response.Flush()
        Response.WriteFile(strFilePath)

Hope this helps you.

 Prasanna K L
 [MCAD(CM) | MCSD.NET(Early Achiever)] [MS Community Star]

 ZapApp India Private Limited

  Level G & 1, Explorer Building, 
  International TechPark, Whitefield Road, 
  Bangalore - 560 066. INDIA
  91-80- 5115 6050 extn. 4084 (phone)
  91-80- 841 1858 (fax)
  [EMAIL PROTECTED]

-----Original Message-----
From: Ajith [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 06, 2003 5:11 PM
To: [EMAIL PROTECTED]
Subject: Problem with Down loading the file



New Message on BDOTNET


Problem with Down loading the file
Reply

�
Reply to Sender ��Recommend 
Message 1 in Discussion 

From: Ajith 

Dear All
Am facing a problem with down loading the file. 
After opening File Download pop up,am clicking on open button
again the File Download pop up is coming after clicking on open its
opening
How to avoid the popup is coming for two times

Below am writing the code 

Dim strFileSize As String
Dim oSourceFile As System.IO.FileInfo
'Finding the file length
oSourceFile = New System.IO.FileInfo(Server.MapPath(strFile))

strFileSize = oSourceFile.Length.ToString
'Response Activiity
Response.Clear()
Response.ClearContent()
Response.ContentType = "application/octet"
Response.AddHeader("Content-Disposition", "attachment; " _
& "filename=" & oSourceFile.Name)

Response.AddHeader("Content-Length", strFileSize)
Response.WriteFile(strFile)

Ajith




DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. 
Before opening attachments please check them for viruses and defects. MindTree 
Consulting Private Limited (MindTree) will not be responsible for any viruses or 
defects or any forwarded attachments emanating either from within MindTree or outside. 
If you have received this message by mistake please notify the sender by return e-mail 
and delete this message from your system. Any unauthorized use or dissemination of 
this message in whole or in part is strictly prohibited. Please note that e-mails are 
susceptible to change and MindTree shall not be liable for any improper, untimely or 
incomplete transmission.


View other groups in this category. 


Also on MSN:
Start Chatting�|�Listen to Music�|�House & Home�|�Try Online Dating�|�Daily Horoscopes 

Passport Member Services. 
For other questions or feedback, go to our Contact Us page. 

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list. 
Remove my e-mail address from BDOTNET. 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to