ImageButton and download file

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>
 
M

Munna

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
 
P

Peter Bucher [MVP]

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.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top