•
•
•
•
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 361,612 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 2,140 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: 546 | Replies: 2
![]() |
•
•
Join Date: Mar 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Hi all,
I would like to open a file in Local drive using Asp.net,
And I have written the following code in user control which could open the file,
Response.AddHeader("Content-Disposition", "attachment; filename=" & strFilename)
Response.WriteFile("C:\\open\\" & strFilename)
Response.Flush()
Response.Close()
The above code working fine in .Net 2005, In SharePoint also I am able to open the file, But After opening the file I am unable to do Any operation in that page, I can do any operation once I refresh the page....
Any Suggestions???
Kindly revert back to me if u have concerns...
Thanks in Advance,
kumar.
I would like to open a file in Local drive using Asp.net,
And I have written the following code in user control which could open the file,
Response.AddHeader("Content-Disposition", "attachment; filename=" & strFilename)
Response.WriteFile("C:\\open\\" & strFilename)
Response.Flush()
Response.Close()
The above code working fine in .Net 2005, In SharePoint also I am able to open the file, But After opening the file I am unable to do Any operation in that page, I can do any operation once I refresh the page....
Any Suggestions???
Kindly revert back to me if u have concerns...
Thanks in Advance,
kumar.
string fileName = @"C:\deneme.txt";
StreamReader sr = File.OpenText(fileName);
while (sr.Peek() != -1)
{
Response.Write(sr.ReadLine() + "<br>");
}
sr.Close(); Serkan Şendur
MCAD.NET
MCAD.NET
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
.net access ajax asp avatar chips code combo custom data dell development dos drivers dropdownlist enterprise firefox graphics hardware ibm ibm. news intel intel ibm internet linux memory microsoft module mozilla net news open open source open-source opengl openoffice pc red hat reuse skin software source sun super supercomputing theme ubuntu vista web windows
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Batch file in ASP.Net to convert Excel files into higher version (ASP.NET)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- Can not fill dataset from database on other computer with ASP .NET and MS Access (Visual Basic 4 / 5 / 6)
- MySQL - ASP.NET - Issues.... (VB.NET)
- ASP.NET problem (ASP.NET)
- Populating & Retrieving Data in a listbox : ASP.NET (w/ VB.NET) (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Scalar variable Error
- Next Thread: Where to insert this code?


Linear Mode