Current location: Hot Scripts Forums » Programming Languages » ASP.NET » prob. file download box


prob. file download box

Reply
  #1 (permalink)  
Old 02-24-07, 07:46 AM
daivagna daivagna is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
prob. file download box

i have provided a download facility...in my apps..but prob. is that i am setting MIME...or content type of .txt files as text/plain...but my prob. is that except txt file every file succesfully downloaded but only there is prob. with txt...coz browser is not able to treat it as txt and when i try to open that txt file which i downloaded it shows html content inside....what tio do????
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 02-24-07, 09:46 AM
koncept
Guest
 
Posts: n/a
set the mime type to be application/octet-stream. that should force it to download any file.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 02-26-07, 03:27 AM
daivagna daivagna is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Talking still facing d prob.

hello sir,
i did the same thing application,octet-stream,,,but still facing d same prob...so i tried to give "text/plain"..as a content type for the .txt files but no then also html content is coming along with my original data of .txt...so tell me what to do
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 02-26-07, 12:20 PM
koncept
Guest
 
Posts: n/a
have you tried having it execute this page in a new window that has no code but the download?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 02-27-07, 01:58 AM
daivagna daivagna is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
did the samething

sir in my prog i have done the same thing..i mean i have one hyperlink with the file name,when one clicks on that it redirects user to download.aspx page...where i have written download code,it works well with .doc....but it appends html contents of download.aspx into .txt file so when i try to open or save that .txt file there is a html content along with original data of .txt..this is the prob..i dnt knw whats wrong..plz help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 02-27-07, 12:08 PM
koncept
Guest
 
Posts: n/a
have you tried removing the html content? When I do a download page it is typicaly a new window with no code but the download. (no html output)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 02-28-07, 02:02 AM
daivagna daivagna is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
solved

hello sir,
thxs for replies...but my prob solved...and just for ur information i am telling u how...I WAS SETTING CONTENT TYPE AFTER SETTING THE HEADERS...but WHEN I SET IT ABOVE ALL THE CODE IT WORKED...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
download file instead of browsing to it nassau JavaScript 4 12-02-05 12:16 PM
Do you use free file hosting? Use sendmefile.com and make money. olhosting General Advertisements 0 10-20-05 08:53 AM
Information collector on file download cramerdy Script Requests 0 09-05-05 05:21 PM
ASP upload prob minority ASP 1 06-27-05 09:35 AM
file download problem ukyankee Perl 6 10-04-03 11:39 PM


All times are GMT -5. The time now is 01:03 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.