<asp:FileUpload runat="server" ID="txtUpload" />
To validate file on selection add onchange event to file upload control. Add below event in page_load
txtUpload.Attributes.Add("onchange", "return validate(this,'" + txtUpload.ClientID + "');");
Here it is Validate script
Here i checked File type as Word Document and size limit upto 25MB. in any case condition fails then it will clears file upload control.
I hope this article will be help full and i would like to have feedback from my blog readers.