0

I am trying to upload a file using asp:fileupload control. But I don't want "No File Chosen" or any other such warning text to be shown when no file is selected. Only selected file name should be shown.

Suhaib Janjua
  • 3,538
  • 16
  • 59
  • 73
Rajan Goswami
  • 33
  • 1
  • 1
  • 7

1 Answers1

0

See the code below:-

.bar:after {
content:"Please select a file";
background-color:white;}

assign it to your FileUpload control. The content message will replace the original one. Of course upon file selection you need to remove the message, you can do this for example via jQuery .removeClass (assuming ID of your FileUpload is "foo"):

$('#foo').change(function() {
$(this).removeClass("bar");})

Hope it helps

Nad
  • 4,605
  • 11
  • 71
  • 160