2

当我单击我的 btnUpload 时,我想使用更新面板来更新我的转发器。当我将 ascynFileUpload 放在 updatePanel 中时,它停止工作,尽管代码隐藏没问题。但是当我将我的 btnUpload 设置为触发器并且只将我的转发器放在更新面板中时,它不会刷新(这很好)但我的代码隐藏停止工作。

<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>
4

0 回答 0