updatepannel的使用

注意:放在updatepannel中的数据,单击事件之后,只重新加载后台数据,不加载前台数据,所以如果页面上有js的插件,对js插件的引用和赋值不要放在updatepannel中,同时尽量减小updatepanel的范围.

<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div style="width: 350px; float: left;">
            <asp:Literal ID="litVideo" runat="server"></asp:Literal><br />
            <asp:Repeater runat="server" ID="rptVideoName" OnItemDataBound="rptVideoName_ItemDataBound" OnItemCommand="rptVideoName_ItemCommand">
                <ItemTemplate>
                    <asp:LinkButton ID="lbVideoName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Title")%>' CommandName="PlayVideo" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ID")%>'></asp:LinkButton>
                </ItemTemplate>
            </asp:Repeater>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>

posted on 2013-12-27 09:30  木子叶  阅读(156)  评论(0编辑  收藏  举报

导航