<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET WebForms</title><link>https://www.dotnetzone.gr:443/cs/forums/13/ShowForum.aspx</link><description>Θέματα για web εφαρμογές, σε ASP.NET WebForms</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: Μετάδοση αρχείου από webserver</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/15471.aspx</link><pubDate>Fri, 04 Aug 2006 16:04:27 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:15471</guid><dc:creator>Νατάσα Μανουσοπούλου</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/15471.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=15471</wfw:commentRss><description>Έστω ότι θέλεις να στείλεις ένα zip:&lt;br&gt;
&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;    Response.ContentType &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"application/zip"&lt;/span&gt;;&lt;br /&gt;    Response.AddHeader(&lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"content-disposition"&lt;/span&gt;, &lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"attachment; filename="&lt;/span&gt; &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;+&lt;/span&gt; fileName);&lt;br /&gt;    Response.AddHeader(&lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"content-length"&lt;/span&gt;, fileSizeInBytes);&lt;br /&gt;    Response.BinaryWrite(fileContents);&lt;br /&gt;&lt;br /&gt;    Response.Flush();&lt;br /&gt;    Response.End();&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
Το ContentType διαφοροποιείται ανάλογα με τον τύπο του αρχείου, και έχει τη μορφή που ορίζεται στο &lt;a href="http://www.ietf.org/rfc/rfc2045.txt"&gt;RFC 2045&lt;/a&gt; παρ. 5.&lt;br&gt;</description></item><item><title>Μετάδοση αρχείου από webserver</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/15463.aspx</link><pubDate>Fri, 04 Aug 2006 04:51:50 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:15463</guid><dc:creator>Paul</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/15463.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=15463</wfw:commentRss><description>&lt;P&gt;Καλησπέρα,&lt;/P&gt;
&lt;P&gt;Προπαθώ να υλοποιήσω το εξής:&amp;nbsp; όταν ο χρήστης πάταει ένα κουμπί στο website που&amp;nbsp;κατασκευάζω να κατεβάινει ένα αρχείο.&lt;/P&gt;
&lt;P&gt;Δοκίμασα τις εντολές: Response.WriteFile(filename) kai Response.TrasmitFile(filename), αλλά και οι δύο είχαν σας αποτέλεσμα το αρχείο να γραφτεί πάνω στη σελίδα και όχι να μεταδοθεί. Υπάρχει καμια ιδέα;&lt;/P&gt;
&lt;P&gt;Ευχαριστώ πολύ! &lt;/P&gt;</description></item></channel></rss>