I've got a problem on a webforms application where a user selects some criteria from dropdowns on the page and hits a button on the page which calls this method:
protected void btnSearch_Click(object sender, EventArgs e)
They then click on button to download a zip file based on the criteria which calls this method:
protected void btnDownload_Click(object sender, EventArgs e)
In IE, they are prompted with the bar at the top of the browser that tells them "To help protect your security, Internet Explorer blocked this site from downloading files to your computer". When they click on that bar to download the file, it fires the btnSearch_Click event again.
Response.ContentType and Response.AddHeader has been set up correctly.
The problem is, that btnSearch appends criteria so basically it is being appended twice and causing problems.
Is there something I can do to prevent this?
This is a vs2008 web app using c# 3.5 for what it's worth.
Thanks!