G
Guest
HELP!!!!
I have a ListBox control, when one of the item is clicked I am using a
series of porperties and methos for Reponse class in order to allow download
diff files. The problem is that it doesn't matter what is clicked after a
item within the listBox is cliecked always the SelectedIndexChanged method
for the listBox is executed. Here is the code:
private void pdfListBox_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
pdfListBox.Enabled = false;
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.Clear();
Response.AppendHeader("Content-Disposition",
"attachment;Filename=Report.pdf");
Response.TransmitFile(pdfListBox.SelectedValue);
HttpContext.Current.ApplicationInstance.CompleteRequest();
}
Any help wil lbe greatlly appreciated.
I have a ListBox control, when one of the item is clicked I am using a
series of porperties and methos for Reponse class in order to allow download
diff files. The problem is that it doesn't matter what is clicked after a
item within the listBox is cliecked always the SelectedIndexChanged method
for the listBox is executed. Here is the code:
private void pdfListBox_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
pdfListBox.Enabled = false;
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.Clear();
Response.AppendHeader("Content-Disposition",
"attachment;Filename=Report.pdf");
Response.TransmitFile(pdfListBox.SelectedValue);
HttpContext.Current.ApplicationInstance.CompleteRequest();
}
Any help wil lbe greatlly appreciated.