1

私は比較的 ASP.NET/C# に慣れていません。長時間実行されるタスクの処理中に、コード ビハインドから更新パネルのラベル タグを更新しようとしています。基本的に、データベースからロードされているいくつかのテーブルがあります。各テーブルの読み込みが完了すると、ラベルを更新してユーザーに通知したいと考えています。多くの検索の後、次のように実装しました。

<div id="LockPage" class="LockOff">
        <div>
            <asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager>
            <asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Image ID="LoadImg" AlternateText="Loading" runat="server" ImageUrl="Images/loading2.gif" />
                    <asp:Label ID="WaitMsg" runat="server" Text="Please Wait...." />
                    <br />
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>

コード ビハインド: テーブル終了時のメソッド内:

WaitMsg.Text = WaitMsg.Text + "Table 1 Completed!"; UpdatePanel.Update();

上記のコードは機能しません。助けてください。

4

0 に答える 0