Posted on: 12/12/2013 9:43:58 AM | Views : 546

Hello all,   i have one fileupload control need to validate from client side to accept only pdf. if i try to upload other file except pdf should give alert and need to remove selected path
<asp:FileUpload ID="FileUplod1" runat="server" Height="18px" onclientclick="CheckFile(this);" /> function CheckFile(Cntrl) { var file = document.getElementById(Cntrl.name); var len = file.value.length; var ext = file.value; if (ext.substr(len - 3, len) != "pdf") { alert("Please select a doc or pdf file "); return false; } } Can you please give me the solution, how can i validate?

Go to the complete details ...