I have a styled file Upload laying on top the vanilla asp.net fileupload control, which is hidden.
If the user comes back to edit his chosen files, there are buttons to view the file or delete it from the dataset; In addition the control is hidden.
However the fake fileupload remains visible.
I have written a custom method to call Jquery from Code behind, but I’m lacking the Jquery skills to hide this fake control and show it on demand.
The task is: Hide the fileupload which is contained in a and show it again if the user clicks on “remove file” & set the control to visible again, so he can choose another file.
Kind regards.
edit: the c# Method containing the Jquery code looks like this right now:
runjQueryCode(@"$(document).ready(function() {
$('#" + Btn_removeFile.ClientID + @"').click(function(){
$('.fakefile').show();
$('"+ fu.ClientID +@"').show();
});
$('.fakefile').hide();
$('"+ fu.ClientID +@"').hide();
});");
What you can do is as follow…It will show the FileUpload if it is already hidden and will hide if it is already visible…
CodeBehind:-
Javascript:-