![]() |
| ||
| Open a file using asp.net 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. |
| ||
| Re: Open a file using asp.net string fileName = @"C:\deneme.txt"; |
| ||
| Re: Open a file using asp.net you cant do any more writing to the page once you close the response. There is really no reason to close the response anyways. also, if all you are sending is the file to be saved then use Response.TransmitFile |
| All times are GMT -4. The time now is 4:08 pm. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC