Question : open fileupload dialog on button click c# asp.net
Answered by :
<asp:FileUpload ID="FileUpload1" runat="server" style="display:none;"/>
<input id="btnFileUpload" type="button" value="Add" runat="server" />
btnFileUpload.Attributes.Add("onclick", "document.getElementById('" + FileUpload1.ClientID + "').click();");
Source : https://stackoverflow.com/questions/4665040/click-event-of-a-button-to-fire-fileupload-control-in-asp-net | Last Update : Thu, 04 Aug 22