Clear the label messages at the time of choosing the file using file uploader

527
February 21, 2017, at 2:34 PM

Below is my aspx page code which contains a file uploader and I need to remove the label messages while choosing the file it self.
How can I do this?

<asp:FileUpload ID="FileUpload1" runat="server"/>

I tried this with the events for fileuploader but they are not working.

Answer 1

you need to add onchange on to fileupload

<asp:FileUpload ID="FileUpload1" runat="server"  onchange="callme();" />

and then, create a JS function to clear your messages

function callme() {
         document.getElementById("your message label id").value= "";
       }

I didn't test, but this should do what you want.

READ ALSO
How to detect click on the focus button using just css3?

How to detect click on the focus button using just css3?

is there any option to detect once visitor click again on the :focus element?

664
Is body a parent tag for internal div?

Is body a parent tag for internal div?

I've started to learn html and css and encountered some misunderstanding

557
Bootstrap validation : 2 glyphicons are overlapping

Bootstrap validation : 2 glyphicons are overlapping

I have validation for 2 fields which are country code and actual mobile numberI have attached screenshot

647