Manual File Downloads In ASP.NET

Introduction

In this article, I'm going to talk about a simple ASP.NET application I recently created for the Slovak parliament. The application allows browsing and displaying transcripts of parliamentary debates (see http://www.nrsr.sk/bin/net/nrozprava/; Slovak language only).

The transcripts are stored as plain text files. Each text file contains transcript for a given time frame, which is encoded in the file's name. All the text files are stored in a single file system folder. How the debate's audio records get transcripted and how the text files make their way into the folder is not important for this discussion.

The job of the ASP.NET application is, among others, to display the list of transcripts with associated time frames and allow the user to view the contents of selected transcripts. In order for the transcript files to be more readable to the user, the application applies some basic HTML formatting to the transcript's plain text before it is sent to the browser for viewing. For various reasons, I've designed the formatting process to take place dynamically whenever a user requests a given transcript file.

You might also like...

Comments

About the author

Palo Mraz

Palo Mraz United States

I live in Slovakia with my wife, two sons (fulltime), one daughter (occasionally) and a dog. I've been doing Microsoft Windows development since 1988; primarily in VB. I'm a big fan of the MS .N...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Computer Science is no more about computers than astronomy is about telescopes.” - E. W. Dijkstra