hi either you for the solution suggested above or you can use the below regular expression for validation
<asp:RegularExpressionValidator ID="uplValidator" runat="server" ControlToValidate="FileUpload1"
ErrorMessage=".doc, .docx formats are allowed"
ValidationExpression="(.+\.([d][o][c])|.+\.([d][o][c][x]))"></asp:RegularExpressionValidator>