Click here to Skip to main content
15,898,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

How to place Browse Button event fire on Image click event and upload image in this image box in c# asp.net?

I don't want any other Browse button and upload button, i want to upload image on image click event only, in my web site application using c# asp.net,
So, please help me, How it can be possible?

Thanks in Advance.

Ankit Agarwal
Website Developer
Posted
Updated 13-Jan-14 19:17pm
v2
Comments
What have you tried and where is the problem?

1 solution

Add FileUpload as a content inside Image Button and handle the FileUpload event
This shd solve ur prblm

<pre lang="HTML">
              <asp:imagebutton id="ImageButton1" runat="server" >
                        <asp:fileupload id="UploadIpFile" runat="server" />
              </asp:imagebutton>
 
Share this answer
 
v2
Comments
[no name] 14-Jan-14 2:07am    
Error:- System.Drawing.ImageButton1, Does not have public property name.
Cenarjun 14-Jan-14 2:09am    
Check out now...Ive updated

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900