Problems with Push Button Event in DataGrid

L

Leonard

I tried this twice yesterday and both times the input went
crazy.

Here's the essence of the problem. I am using a DataGrid,
dgPubs, that binds to a SqlDataReader with a list of files
to download. There is a column with a pushbutton to
trigger the file download. After the download my plan is
to redisplay the page so the user can download another
file if he chooses. I have "Close" button whose handler
redirects to the default site page. I have "wired" the
event using a statement in the Page_Load that runs each
time the page is loaded whether postback or not:

dgPubs.ItemCommand += new DataGridCommandEventHandler
(this.dgPubs_DownloadItem);

There are two issues.

First, whenever a pushbutton is pressed the button event
fires twice before the client file dialog appears. I
don't understand why and what the consequences are.

Secondly, the "Close" button must be pressed twice to
dismiss the Pubs page and return to the home page. What
is wrong?

There are also some issues with corrupting the downloaded
files (mostly in PDF format). Some help here would be
appreciated.

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top