I have a little problem with a page im trying to create. In resume, I want to validate if a file has been selected by the user and then upload it on the server. I know it is possible to do it throught javascript :
if(document.getElementById("uploadBox").value != "") {
// you have a file
}
But the thing is if I add the property runat="server" to my input :
<input id="myFile" type="file" runat="server" />
I can't validate anymore. So, do you know a way to do what I am trying to do.
PS: Keep in mind that I want to validate with javascript to catch the postback and then show an error message using ajax. That's why im not doing the validation trough server code.
Thank you :)