<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CM &#187; File</title>
	<atom:link href="http://corymathews.com/tag/file/feed/" rel="self" type="application/rss+xml" />
	<link>http://corymathews.com</link>
	<description>Things I should remember and then some...</description>
	<lastBuildDate>Fri, 04 May 2012 16:56:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>ASP.NET/C# Prompt a Save Dialog Box to Download a File</title>
		<link>http://corymathews.com/aspnetc-prompt-a-save-dialog-box-to-download-a-file/</link>
		<comments>http://corymathews.com/aspnetc-prompt-a-save-dialog-box-to-download-a-file/#comments</comments>
		<pubDate>Sat, 16 May 2009 01:04:26 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[File]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=397</guid>
		<description><![CDATA[To save you all (as well as my future self) the trouble of searching all over the place just to find terrible answers on almost every form post out there. Here is a small ASP.NET/C# code snippet that will prompt the user with the save/open dialog box to download a file. String FileName = "FileName.txt"; [...]]]></description>
			<content:encoded><![CDATA[<p>To save you all (as well as my future self) the trouble of searching all over the place just to find terrible answers on almost every form post out there. Here is a small ASP.NET/C# code snippet that will prompt the user with the save/open dialog box to download a file.</p>
<pre name="code" class="c++">
String FileName = "FileName.txt";
String FilePath = "C:/...."; //Replace this
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
response.ContentType = "text/plain";
response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ";");
response.TransmitFile(FilePath);
response.Flush();
response.End();
</pre>
<p>For more content types check our <a href="http://en.wikipedia.org/wiki/MIME_type#List_of_common_media_types" title="MIME Types">http://en.wikipedia.org/wiki/MIME_type#List_of_common_media_types</a></p>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/aspnetc-prompt-a-save-dialog-box-to-download-a-file/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

