当前位置:编程学习 > C#/ASP.NET >>

AjaxControlToolkit中的ModalPopupExtender1怎么和datalist结合?

我现在用datelist 显示数据其中有一个按钮我想单击这个按钮弹出ModalPopupExtender1所设置的panner控件,请问这怎么做啊? --------------------编程问答-------------------- 怎么没有人回答啊?帮帮忙吧,急啊!! --------------------编程问答-------------------- 怎么没有人解答我的问题,难道在这里都得不到答案吗?  --------------------编程问答-------------------- 失望至极 --------------------编程问答--------------------

 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnSearch" />
                        <asp:AsyncPostBackTrigger ControlID="ddlProductType" EventName="SelectedIndexChanged" />
                        <asp:AsyncPostBackTrigger ControlID="updateBtn" />
                    </Triggers>
                    <ContentTemplate>
                        <asp:Timer ID="Timer1" runat="server" Interval="100000" OnTick="Timer1_Tick" OnDisposed="Timer1_Disposed">
                        </asp:Timer>
                        <fieldset>
                            <legend>消息区域</legend>
                            <asp:Label ID="Label2" runat="server" Text="暂无消息提示" ForeColor="Red"></asp:Label>
                            <asp:Label ID="Label1" runat="server" Text="10秒后刷新进行局部刷新 获取服务器时间"></asp:Label>
                        </fieldset>
                        <fieldset>
                            <legend class="fd">结果列表</legend>
                            <asp:GridView ID="GridView1" runat="server" OnSorting="GridView1_Sorting" AutoGenerateColumns="False"
                                AllowSorting="True" Width="100%" DataKeyNames="ListID" OnRowCommand="GridView1_RowCommand"
                                OnRowDataBound="GridView1_RowDataBound" CssClass="border">
                                <AlternatingRowStyle HorizontalAlign="Center" CssClass="dbtable_data1" />
                                <RowStyle HorizontalAlign="Center" CssClass="dbtable_data2" VerticalAlign="Middle"></RowStyle>
                                <HeaderStyle CssClass="dbtable_title"></HeaderStyle>
                                <FooterStyle HorizontalAlign="Center" VerticalAlign="Middle"></FooterStyle>
                                <Columns>
                                    <asp:BoundField DataField="ListID" HeaderText="产品标识" SortExpression="ListID" />
                                    <asp:TemplateField HeaderText="编号">
                                        <ItemTemplate>
                                            <asp:Label ID="lblNum" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<input type='checkbox' name='allbox' onclick='javascript:selectAll();'><b>全选</b>">
                                    </asp:TemplateField>
                                    <asp:HyperLinkField DataNavigateUrlFields="listid" DataNavigateUrlFormatString="~/GroundManger/Product/addorupdateproduct.aspx?ListID={0}"
                                        DataTextField="Productname" HeaderText="Menus" SortExpression="Productname" />
                                    <asp:BoundField DataField="ProductName" HeaderText="产品名称" SortExpression="ProductName" />
                                    <asp:BoundField DataField="RegTime" HeaderText="录入时间" SortExpression="RegTime" DataFormatString="{0:d}"
                                        HtmlEncode="False" />
                                    <asp:TemplateField HeaderText="编辑">
                                        <ItemTemplate>
                                            <asp:ImageButton ID="Button" CommandName="edititem" runat="server" ImageUrl="../img/modify.gif"
                                                CommandArgument='<%# Eval("ListID") %>' OnClick="Button_Click" />
                                            <cc2:ConfirmButtonExtender ID="ConfirmButtonExtender2" runat="server" TargetControlID="Button"
                                                OnClientCancel="cancelClick" DisplayModalPopupID="ModalPopupExtender1" />
                                            <br />
                                            <cc2:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="Button"
                                                PopupControlID="PNL" OkControlID="ButtonOk" CancelControlID="ButtonCancel" BackgroundCssClass="modalBackground" />
                                            <asp:Panel ID="PNL" runat="Server" Style="display: none;">
                                                <table class='win_table' align='center' border='0' cellpadding='0' cellspacing='1'>
                                                    <tr>
                                                        <td colspan='2' align='center' class='win_table_top' style="width: 396px">
                                                            操作</td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            Are you sure you want to click the Button?</td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <div style="text-align: right">
                                                                <asp:Button ID="Button5" runat="server" Text="跳转到产品页" OnClick="Button5_Click" />
                                                                <asp:Button ID="ButtonCancel" runat="server" Text="Cancel" />
                                                                <!--这个按钮的ID被设置成了ModalPopupExtender控件的OkControlID 不知道为什么不能执行服务器方法了? -->
                                                                <asp:Button ID="ButtonOk" runat="server" Text="OK" />
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </asp:Panel>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="删除">
                                        <ItemTemplate>
                                            <asp:ImageButton ID="deleteImgBtn" CommandName="deleteitem" runat="server" ImageUrl="../img/delete.gif"
                                                CommandArgument='<%# Eval("ListID") %>'></asp:ImageButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <SelectedRowStyle BackColor="Cyan" CssClass="dbtable_data3" />
                            </asp:GridView>
                        </fieldset>
                        <fieldset>
                            <legend class="fd">分页显示 </legend>
                            <webdiyer:AspNetPager ID="AspNetPager" runat="server" FirstPageText='<font face="webdings">9</font>'
                                LastPageText='<font face="webdings">:</font>' NextPageText='<font face="webdings">4</font>'
                                NumericButtonCount="15" OnPageChanged="AspNetPager_PageChanged" PageSize="15"
                                PrevPageText='<font face="webdings">3</font>' ShowCustomInfoSection="Left" ShowNavigationToolTip="True"
                                SubmitButtonClass="btn">
                            </webdiyer:AspNetPager>
                        </fieldset>
                    </ContentTemplate>
                </asp:UpdatePanel>
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,