UpdatePanel中的AsyncFileUpload

时间:2012-12-19 10:51:25

标签: asp.net repeater asyncfileupload updatepanel

当我点击om my btnUpload时,我想使用更新面板更新我的转发器。 当我把我的ascynFileUpload放在updatePanel中时停止工作,虽然代码隐藏是可以的。 但是当我将我的btnUpload设置为触发器并且只将我的转发器放在updatepanel中时,它不会刷新(这很好)但是我的代码隐藏不再起作用。

<div id="addEntry" class="row centered" runat="server">
                <asp:Label ID="lblFeedback" runat="server"></asp:Label>
                <abbr title="Max 20MB">
                    <asp:AsyncFileUpload ID="uploadEntry" runat="server" CompleteBackColor="White" />
                </abbr>
                <div id="uploading">
                </div>
                <asp:TextBox ID="txtEntryDescription" runat="server" TextMode="MultiLine" placeholder="Description upload (optional)"
                    Width="100%" Height="60px"></asp:TextBox><br />
                <asp:Button ID="btnAddEntry" runat="server" Text="Upload" CssClass="btn btn-round"
                    OnClick="btnAddEntry_Click" />
                <hr />
</div>
<div id="competitionRounds" class="row">
                <asp:UpdatePanel ID="updatepnl" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:Repeater ID="rptEntries" runat="server" DataSourceID="dsEntries">
                            <ItemTemplate>
                                <%# "<div class=\"imgThumb" + Eval("entryWinner") + " draggable\" style=\"background-image:url('uploads/"
                                + Eval("entryImagename") + "');\" data-id=\""
                                + Eval("pk_entryId") + "\"></div>"
                                %>
                            </ItemTemplate>
                        </asp:Repeater>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnAddEntry" EventName="click" />
                    </Triggers>
                </asp:UpdatePanel>
</div>

0 个答案:

没有答案