ImageButton and download file

  • Thread starter Thread starter adnan.masood
  • Start date Start date
A

adnan.masood

I want to put a image button on the page where if user clicks should
download a zip file for the user

I could do it following way but I want to put asp.net button.

<a href="Myzip.zip"><img src="images/download_trial_btn.gif"/></a>
 
Hi

Hi whats wrong with your current code? it works and work okay...

well

here is a code example... for you,,,,

<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/
cet_normal.png" onclientclick="yahoo(); return false;" />
<script language="javascript" type="text/javascript">
function yahoo()
{
window.location = "http://localhost:5504/
icons_for_entity.zip";
return false;
}
</script>

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
 
Hello adnan
I could do it following way but I want to put asp.net button. Why?

<a href="Myzip.zip"><img src="images/download_trial_btn.gif"/></a>
Use a HyperLink Control and thus .ImageUrl Property.

At this issue, a ImageButton is not needed - its the wrong control instead.
 
Back
Top