•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,598 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,454 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 489 | Replies: 4
![]() |
•
•
Join Date: Jul 2007
Location: rohini
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
hello to all ,i want to attach a text file for downloading the website i am developing through asp.net.........
plz help me in the coding..........
i am sending the coding as below.........
on link button...
Response.AppendHeader("Content-Disposition",Attachment.FileName=TextFile1.txt);
Response.ContentType="Text";
Response.WriteFile("TextFile1.txt");
plz help me in the coding..........
i am sending the coding as below.........
on link button...
Response.AppendHeader("Content-Disposition",Attachment.FileName=TextFile1.txt);
Response.ContentType="Text";
Response.WriteFile("TextFile1.txt");
•
•
Join Date: Sep 2007
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
Hi coolshail...
Try out with this
Response.Clear()
Response.AddHeader("content-disposition", "attachment;filename=Text1.txt")
Response.AppendHeader("Content-disposition", "attachment; filename=Text1.txt")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
It working fine.....
Try out with this
Response.Clear()
Response.AddHeader("content-disposition", "attachment;filename=Text1.txt")
Response.AppendHeader("Content-disposition", "attachment; filename=Text1.txt")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
It working fine.....
•
•
Join Date: Jul 2007
Location: rohini
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
@ rmahesh.............
those coding were working properly.but the problem is wen i click the link button the file poped up to get downloaded or opened is in HTML format and is of 8.01 kb........
is tat the problem of path..........
plz tell me how to gave path of the file to get downloaded.
thanks wid regards.....
those coding were working properly.but the problem is wen i click the link button the file poped up to get downloaded or opened is in HTML format and is of 8.01 kb........
is tat the problem of path..........
plz tell me how to gave path of the file to get downloaded.
thanks wid regards.....
•
•
Join Date: Jul 2007
Location: rohini
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
@ rmahesh.............
those coding were working properly.but the problem is wen i click the link button the file poped up to get downloaded or opened is in HTML format and is of 8.01 kb........
is tat the problem of path..........
plz tell me how to gave path of the file to get downloaded.
thanks wid regards.......
those coding were working properly.but the problem is wen i click the link button the file poped up to get downloaded or opened is in HTML format and is of 8.01 kb........
is tat the problem of path..........
plz tell me how to gave path of the file to get downloaded.
thanks wid regards.......
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- asp .net & vb .net html rich text editor (ASP.NET)
- Impersonation in ASP.NET (ASP.NET)
- ASP.NET and Mozilla - Issues! (ASP.NET)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- Error creating new ASP.Net project (ASP.NET)
- Forms Authorization/ Authentication using asp .net and vb .net (ASP.NET)
- Populating & Retrieving Data in a listbox : ASP.NET (w/ VB.NET) (ASP.NET)
- Question for ASP.NET/Mozilla Users...or anyone... (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: How Can I Download Templates For ASP.Net?
- Next Thread: how to change pictures on a web page through threading....


Linear Mode