Rakesh is right. An alternative with this one is to add a javascript code on the
OnClientClick
of your
asp:Button
tag. Take a look.
<asp:Button ID="button1" runat="server" OnClientClick="abc(); return false;" Text="view image" />
[Update]
I did'nt know you had a server side event on your button, the code you posted is different. In this case, why wont you just set
img.Visible = true
on your button click event and
img.Visible = false
on your Page Load.