简体   繁体   中英

UpdatePanel refresh and remove popup screen

All my work in popup screen. I use user control ImportCSVFile to upload file when i use AsyncPostBackTrigger it not send file so i constrained to use PostBackTrigger but page make reload and popup screen is removed. i want suggestion in this point how to send file without refresh page and remove popup?

<%@ Register Src="~/UserControls/ImportCSVFile.ascx" TagName="ImportCSVFile" TagPrefix="uc1" %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional" ChildrenAsTriggers="true">
        <ContentTemplate>
            <table cellspacing="0" width="100%">
                <tr align="center">
                    <td align="right">
                        <uc1:ImportCSVFile ID="ImportCSVFile" runat="server"  />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="ImportCSVFile" />
        </Triggers>
</asp:UpdatePanel>

I guess your ImportCSVFile Control use asp.net FileUpload-Control. It doesn't work with partial postbacks in UpdatePanel. You could switch to the AsyncFileUpload-Control (see http://www.ajaxtoolkit.net/AsyncFileUpload/AsyncFileUpload.aspx )

Regards, Sebastian

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM