How to change the Text of the browse button in the FileUpload Control (System.Web.UI.WebControls)

asp.netfile upload

I want to change the Text of the browse button in the FileUpload Control (System.Web.UI.WebControls), instead of the [Browse…] text I want to use […]

Best Answer

This is old, but wanted to offer another solution. You can use jQuery on a standard HTML hyperlink and fire asp:FileUpload on click of the HREF. Just hide the asp:FileUpload at design and doctor the href any way you'd like.

Link

<a href="#" id="lnkAttachSOW">Attach File</a>

asp:FileUpload

<asp:FileUpload ID="fuSOW" runat="server" style="visibility:hidden;"/>

Then the jQuery:

$("#lnkAttachSOW").click(function () {
    $("#fuSOW").click();
});