Question

I have placed fileupload and asp button in update panel and update progress bar, now my problem is i am unable to get update progressbar on button click , my code is

 <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <asp:UpdatePanel ID="up1" runat="server">
    <Triggers>
        <asp:PostBackTrigger ControlID="btnSubmit" />
    </Triggers>
        <ContentTemplate>
            <div class="bodytext" style="height: 480px; width: 830px;">
                <table style="width: 600px" align="center">
                    <tr>
                        <td class="style2">
                            <br />
                            File Attachment
                        </td>
                        <td>
                            <br />
                            <asp:FileUpload ID="fluattach" runat="server" ClientIDMode="Static" />
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                        </td>
                        <td>
                        </td>
                        <td>
                            <span class="art-button-wrapper"><span class="l"></span><span class="r"></span>
                                <asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="art-button" ClientIDMode="Static"
                                    OnClick="btnSubmit_Click" />
                            </span>
                        </td>
                    </tr>
</table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="up1"
        DynamicLayout="true">
        <ProgressTemplate>
            <div id="progressBackgroundFilter">
            </div>
            <div id="Progressbar" class="Progressbar" align="center" valign="middle" runat="server">
                <asp:Image ID="Image1" Width="75" Height="95" runat="server" ImageUrl="~/images/animation_processing.gif" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>

i wrote that code it is working fine but unable to see the progressbar in saving time and send the mail, i can remove the trigger progressbar is wroking in save time but sending mail (fileupload HAS returns the false) so no attachment added, i have working both functionalaties, how it possible please help me as quick as possible....

thank u hmk

Was it helpful?

Solution

It seems you messed up your code. Try to keep it simple and then try again:

    <asp:UpdateProgress runat="server" id="PageUpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" DynamicLayout="false">
<ProgressTemplate>
Processing Request from Update 1. Please Wait..
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel runat="server" id="UpdatePanel1">
<ContentTemplate>
<asp:Button runat="server" id="UpdateButton" onclick="UpdateButton_Click" text="Update 1" />
</ContentTemplate>
</asp:UpdatePanel>


    protected void UpdateButton_Click(object sender, EventArgs e)
    {
      System.Threading.Thread.Sleep(5000);
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top