I have been working on a custom fileupload control in asp.net. But it is to difficult to do it. I have come so far but I have problem that I cannot understand.
I am trying to hide fileupload control and display an image instead. wehn the user clicks the image, I want the upload file to pop up. I tried the same thing in html with jquery and it works, but it doesnt work in aspp.net
The uploadfile doesnt show up.
here is the html code - http://jsfiddle.net/ees2q/1/
here is the asp.net code:
<asp:FileUpload ID="FileUpload1" runat="server" style="display:none" />
<img id="upload_img" src="http://us.cdn1.123rf.com/168nwm/artlosk/artlosk1010/artlosk101000085/7909823-single-rectangle-upload-button.jpg" width="20px">
<script>$(document).ready(function () { $('#upload_img').click(function () { $('#FileUpload1').click(); }); });</script>
Please help me to fix asp.net code to display the fileupload