I have to create a file upload that only allows .csv files. So far, I have a cosmetic interface of:
<asp:Label ID="importLabel" runat="server" Text="Update Prices" CssClass="fieldLabel" />
<asp:FileUpload ID="importFileUpload" runat="server" OnDataBinding="importFileUpload_DataBinding"/>
<asp:Button ID="importFileButton" runat="server" Text="Update Prices" CssClass="fieldlabel" OnClick="importFileButton_Click" />
<br />
<asp:RegularExpressionValidator ID="uploadValidator" runat="server" ControlToValidate="importFileUpload" ErrorMessage="Only .csv files are allowed"
ValidationExpression="(.+\.([Cc][Ss][Vv]))" />
It works as it should where you can select a .csv file, however I'm not sure of my next step here. Any help or any nudge in the right direction would be awesome!