Reputation: 4524
I am using a FileUpload in my asp.net application. I want to show only 'Browse' button, I don't want to use any flash file.
How is that possible?
I am tried a example but in this, btn style is getting change, textbox is showing, other example this is also not solving my problem.
<asp:FileUpload ID="ImageFileId" runat="server" class="file" />
<asp:Button ID="browse" runat="server" Text="Change Image" />
.file
{
visibility: hidden;
height: 0;
width: 0;
display: block;
}
$(function() {
$('#browse').click(function() { $('.file').click(); });
});
please give some example?
Upvotes: 1
Views: 4332
Reputation: 6780
Try this example, note - you need to use visibility: hidden
otherwise the browser won't perform the action for security reasons.
Upvotes: 2