Categories
Archives
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- December 2009
- October 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
Meta
Monthly Archives: May 2007
TIP: File download using ASP.NET
The following is a method to send a file to browser using ASP.NET Dim fs As FileStreamDim strPath = "C:\DownloadableFilePath\"Dim strFileName As String = "Filename.pdf"fs = File.Open(strPath & strFileName, FileMode.Open)Dim bytBytes(fs.Length) As Bytefs.Read(bytBytes, 0, fs.Length)fs.Close()Response.AddHeader("Content-disposition", "attachment; filename=" & strFileName)Response.ContentType … Continue reading
TIP: Developing ASP.NET 2.0 applications simultaneously with both C# and VB.NET
If the code (say some classes) is written in C# and if the application is being developed in Visual Basic.NET, you can create a separate folder under the App_Code folder. The folder must be added as a code subdirectory in … Continue reading