Link to home
Start Free TrialLog in
Avatar of dwezil
dwezilFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How do I reference the fileuploader, trying to make msgbox appeaer if fileuploader hasnt been submitted

I currently use this when one of  my dropdowns hasnt be selected. Now I need to be able to stop the user from submitting a request if the attachment hasnt been attached and the path is still visible in the uploader. I was going for an onlick if uploader is not blank then msgbox popup. The problem is I dont know how to reference the uploader. .Text .Value or another way? This is my attempt...

All help much appreciated
btnSubmit.Attributes.Add("onclick", "if(document.getElementById('FileUploadControl').text!='') {window.alert('Please submit your attachment before submitting request');return false;}");

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dwezil

ASKER

well could i possibly create a text box that mirrors the text in the uploader and set the msgbox to react to whether that text box has text or not?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dwezil

ASKER

thats annoying, I thought it would have been a simple thing to do
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dwezil

ASKER

not even FileUploadControl.HasFile. Im clutching at straws here
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dwezil

ASKER

Thanks for your help Tim