Click here to Skip to main content
15,913,202 members
Home / Discussions / C#
   

C#

 
Questionchange font size Pin
Test2703071-Apr-07 19:40
Test2703071-Apr-07 19:40 
AnswerRe: change font size Pin
andre_swnpl1-Apr-07 19:52
andre_swnpl1-Apr-07 19:52 
GeneralRe: change font size Pin
Test2703071-Apr-07 20:18
Test2703071-Apr-07 20:18 
Question.net Pin
Renuka Reddy1-Apr-07 19:38
Renuka Reddy1-Apr-07 19:38 
QuestionHow can i send text messages server to client computer on LAN ? Pin
PavanPareta1-Apr-07 19:17
PavanPareta1-Apr-07 19:17 
AnswerRe: How can i send text messages server to client computer on LAN ? Pin
mikailcetinkaya1-Apr-07 21:09
mikailcetinkaya1-Apr-07 21:09 
QuestionRegular Expression - Extracting Image tags Pin
nasambur1-Apr-07 18:08
nasambur1-Apr-07 18:08 
QuestionDataGridView text -> image Pin
Glen Harvy1-Apr-07 18:04
Glen Harvy1-Apr-07 18:04 
AnswerRe: DataGridView text -> image Pin
mikailcetinkaya1-Apr-07 21:12
mikailcetinkaya1-Apr-07 21:12 
GeneralRe: DataGridView text -> image Pin
Glen Harvy2-Apr-07 2:42
Glen Harvy2-Apr-07 2:42 
QuestionPlz answer these Pin
yaminilatha1-Apr-07 17:56
yaminilatha1-Apr-07 17:56 
AnswerRe: Plz answer these Pin
Krish - KP1-Apr-07 18:08
Krish - KP1-Apr-07 18:08 
GeneralRe: Plz answer these Pin
yaminilatha2-Apr-07 0:49
yaminilatha2-Apr-07 0:49 
AnswerRe: Plz answer these Pin
Keshav V. Kamat1-Apr-07 22:38
Keshav V. Kamat1-Apr-07 22:38 
GeneralRe: Plz answer these Pin
yaminilatha2-Apr-07 0:50
yaminilatha2-Apr-07 0:50 
QuestionFile copy Pin
N a v a n e e t h1-Apr-07 17:20
N a v a n e e t h1-Apr-07 17:20 
AnswerRe: File copy Pin
joon vh.1-Apr-07 21:46
joon vh.1-Apr-07 21:46 
QuestionSqlDependency and Release Build Pin
Darkness841-Apr-07 17:04
Darkness841-Apr-07 17:04 
AnswerRe: SqlDependency and Release Build Pin
Darkness841-Apr-07 21:36
Darkness841-Apr-07 21:36 
QuestionProblem with “Response.BinaryWrite Pin
tedhill131-Apr-07 14:13
tedhill131-Apr-07 14:13 
It seems that the download dialog triggered by this code
prevents the label control “Label2” to show its message.

What should I change/add to this code in order that the message
"Download Complete" could appear in the web page in the
“Label2” control ?


Here is the relevant code:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

protected void DownlFile_Click(object sender, EventArgs e)
{


string web_path = "./items/X-103.pdf";

string path = Server.MapPath(web_path);

FileStream MyFileStream = new FileStream(path, FileMode.Open);
long FileSize;
FileSize = MyFileStream.Length;
byte[] Buffer = new byte[(int)FileSize];
MyFileStream.Read(Buffer, 0, (int)MyFileStream.Length);
MyFileStream.Close();
Response.ContentType = "application/pdf";

Response.AddHeader
("content-disposition", "attachment; filename= X-103.pdf");

Response.BinaryWrite(Buffer);

Label2.Text = "Download Complete";

}

<asp:Button ID="DownlFile" runat="server" Text="Download The File"
OnClick="DownlFile_Click" />
<br /> <br />
<asp:Label ID="Label2" runat="server" Text=""></asp:Label>

AnswerRe: Problem with “Response.BinaryWrite Pin
Christian Graus1-Apr-07 14:56
protectorChristian Graus1-Apr-07 14:56 
GeneralRe: Problem with “Response.BinaryWrite Pin
tedhill132-Apr-07 0:06
tedhill132-Apr-07 0:06 
QuestionGhosted icon Pin
Sergio Paque1-Apr-07 13:33
Sergio Paque1-Apr-07 13:33 
AnswerRe: Ghosted icon Pin
Judah Gabriel Himango1-Apr-07 16:47
sponsorJudah Gabriel Himango1-Apr-07 16:47 
GeneralRe: Ghosted icon Pin
Sergio Paque2-Apr-07 0:53
Sergio Paque2-Apr-07 0:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.