What you should know is that you cannot check the status of a file upload using the standard FileUpload control. What you can do is to upload the file on the server and then connect to it using ODBC and start reading and inserting lines in your database asynchronous (by making a ajax request to a page or using a script service).
As far as the progress bar goes, you should simply use a CSS progres bar (you can find a simple example at: http://css-tricks.com/examples/ProgressBars/).
Then, you should build a script service (using a web serivice) with a method that can return the status of your progress from the server:
Your *.asmx file should contain something like:
[WebMethod]
public int GetStatus()
{
int progress = 0; // in percents
// your server-side code here
return progress;
}
Your aspx page should contain something like:
<asp:ScriptManager runat="server" ID="ScriptManager">
<Services>
<asp:ServiceReference Path="~/services/import.asmx" InlineScript="false" />
</Services>
</asp:ScriptManager>
Then, you should be able to call that method from JavaScript periodically (each second for example, using setTimeout) and update the progress bar width with simple JavaScript or jQuery:
var tout, service;
function UpdateStatus() {
if (tout != null)
clearTimeout(tout);
if (service == null)
service = new namespace.here.serice_class_here();
service.GetStatus(onSuccess, onFailure);
}
function onSuccess(result) {
// update the width of the progress with result (the integer value of the progress)
progress_bar.style.width = percent + "%";
// call the method again
tout = setTimeout("UpdateStatus()", 1000);
}
function onFailure(error) {
alert(error.get_message());
}
You could extend your onSuccess JavaScript function and when the progress is complete (returned value is 100%) you could redirect the user to another page or display an info or a button depending on your needs.
I hope this helps!