Rocky
Rocky

Reputation: 4524

how to show only 'Browse' button of asp fileupload?

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

Answers (2)

Shaik Raffi
Shaik Raffi

Reputation: 174

This is awesomw tutorial file upload using CSS GoHere

Upvotes: 0

Barry Chapman
Barry Chapman

Reputation: 6780

Try this example, note - you need to use visibility: hidden otherwise the browser won't perform the action for security reasons.

http://jsfiddle.net/tfeuk/1/

Upvotes: 2

Related Questions