Hello sir I have used below code but its not working in ie..
then how to use it..
<script type="text/javascript">
function checkfilesize(source, arguments) {
arguments.IsValid = false;
var size = document.getElementById("<%=fu1.ClientID%>").files[0].size;
alert(size);
if (size > 102400) {
arguments.IsValid = false;
return false;
}
else {
arguments.IsValid = true;
return true;
}
}
</script>
<asp:FileUpload ID="fu1" runat="server" />
<asp:CustomValidator ID="cvvalidate" runat="server" ToolTip="FileSize should not exceed 1MB"
Style="color: #FF0000; display: inline; float: left; font-family: arial; font-size: 13px;
margin-left: 100px; margin-top: 10px;" ValidationGroup="a" ErrorMessage="FileSize Exceeds the Limits."
ControlToValidate="fu1" ClientValidationFunction="checkfilesize"></asp:CustomValidator>