本文介绍了2005年未知的服务器标签cc1:modalpopupextender的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>









这是我的设计我收到的错误是未知的服务器标签cc1:modalpopupextender







This is my design i am getting the error as unknown server tag cc1:modalpopupextender

<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Font-Names="Arial"

            Font-Size="11pt" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"

            CellPadding="4" OnRowCommand="GridView1_RowCommand">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:CheckBox ID="CheckAll" onclick="return check_uncheck (this );" runat="server" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="ID" Visible="false" Text='<%# DataBinder.Eval (Container.DataItem, "Id") %>'

                            runat="server" />
                        <asp:CheckBox ID="deleteRec" onclick="return check_uncheck (this );" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Id" SortExpression="Id">
                    <EditItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("Id") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Id") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="FileName" SortExpression="FileName">
                    <EditItemTemplate>
                        <asp:Label ID="LblFileName" runat="server" Text='<%# Eval("File_Name") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblFileName1" runat="server" Text='<%# Bind("File_Name") %>'></asp:Label>
                        <asp:ImageButton ID="img" runat="Server" CommandName="Image" ImageUrl="~/images/view1.png" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <AlternatingRowStyle BackColor="White" />
            <RowStyle BackColor="#F7F7DE" />
            <FooterStyle BackColor="#CCCC99" />
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
        <asp:Panel ID="pnlAddEdit" runat="server" CssClass="modalPopup" Style="display: none;
            height: auto; width: auto;">
            <br />
            <table align="center">
                <tr>
                    <td>
                        <asp:GridView ID="dynamicGridView" runat="server" AutoGenerateColumns="True" Font-Names="Courier New"

                            Font-Size="11pt" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"

                            CellPadding="4">
                            <AlternatingRowStyle BackColor="White" />
                            <RowStyle BackColor="#F7F7DE" />
                            <FooterStyle BackColor="#CCCC99" />
                            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <asp:Button ID="btnCancel" runat="server" Text="Ok" OnClientClick="return Hidepopup()" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
        <cc1:ModalPopupExtender ID="popup" runat="server" DropShadow="false" PopupControlID="pnlAddEdit"

            TargetControlID="lnkFake" BackgroundCssClass="modalBackground">
        </cc1:ModalPopupExtender>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="GridView1" />
    </Triggers>
</asp:UpdatePanel>
</form>

推荐答案

<%@ Page %>

page declaration:



page declaration:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>



<cc1:ModalPopupExtender ID="popup" runat="server" DropShadow="false" PopupControlID="pnlAddEdit"

            TargetControlID="lnkFake" BackgroundCssClass="modalBackground">
        </cc1:ModalPopupExtender>


这篇关于2005年未知的服务器标签cc1:modalpopupextender的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 01:59