標準のFileUploadコントロールを使用してファイルアップロードのステータスを確認することはできません。あなたは、ファイルをサーバーにアップロードし、ODBCを使用してファイルに接続し、非同期でデータベースに行を読み込んだり挿入したりすることができます(ページへのajax要求やスクリプトサービスの使用による)。
プログレスバーが表示される限り、CSSプログレスバーを使用するだけです(簡単な例はhttp://css-tricks.com/examples/ProgressBars/です)。
:あなた*の.asmxファイルのようなものが含まれている必要があり
:次に、あなたがサーバーから自分の進捗状況を返すことができる方法で(ウェブseriviceを使用して)スクリプトサービスを構築する必要があり
[WebMethod]
public int GetStatus()
{
int progress = 0; // in percents
// your server-side code here
return progress;
}
あなたのaspxページのようなものを含める必要があります。その後、あなたは定期的に、JavaScriptからそのメソッドを呼び出すことができる必要があり
<asp:ScriptManager runat="server" ID="ScriptManager">
<Services>
<asp:ServiceReference Path="~/services/import.asmx" InlineScript="false" />
</Services>
</asp:ScriptManager>
を(exampのための毎秒ル、setTimeoutメソッドを使用して)、簡単なJavaScriptや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());
}
あなたがするonSuccess JavaScriptの機能を拡張することができ、進行状況が(返された値が100%である)が完了したときににユーザーをリダイレクトすることができ別のページを表示したり、必要に応じて情報やボタンを表示したりできます。
こちらがお役に立てば幸いです。