gpt4 book ai didi

asp.net - 元素 'RadGrid' 不是已知元素

转载 作者:行者123 更新时间:2023-12-04 06:11:22 24 4
gpt4 key购买 nike

我正在尝试使用 Telerik RadGrid,但收到以下警告:

"Element 'RadGrid' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing."



以下是我已经检查过的一些内容:
  • web.config 文件没有丢失,并且没有任何其他文件
    页面上的编译问题。
  • Telerik.Web.UI dll 在 GAC 中,项目的引用
    指向那个文件。 bin 文件夹中没有 Telerik dll。
  • 在程序集中使用它在 web.config 中添加程序集
    部分:<add assembly="Telerik.Web.UI, Version=2011.1.413.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
  • RadGrid 的属性有效,因此 Visual Studio 能够
    弄清楚对象是什么
  • 页面运行正常,我只有这组烦人的
    警告。
  • 我尝试在页面上为 Telerik 程序集添加 @Register 语句,但没有任何变化
  • 我尝试清理/重建,但没有变化
  • 我尝试重新启动 Visual Studio,没有变化
  • 我尝试重新启动机器,没有变化

  • 编辑:
    这是我正在使用的标记。
    <%@ Page Title="" Language="C#" MasterPageFile="~/masterPages/ActionAreaSinglePanelMaster.Master" AutoEventWireup="true" CodeBehind="overview.aspx.cs" Inherits="Compass.overview" %>


    <asp:Content ID="PanelHeaderContent" ContentPlaceHolderID="PanelHeaderPlaceholder" runat="server">
    <p>Panel header</p>
    </asp:Content>


    <asp:Content ID="PanelContent" ContentPlaceHolderID="PanelDataPlaceholder" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../Scripts/radGridLayout.js" type="text/javascript"></script>
    <script type="text/javascript">
    panelGridID = "<%=panelGrid.ClientID %>";
    </script>

    <asp:ObjectDataSource ID="BundleItemsSource" runat="server" TypeName="Compass.Data.CompassUI" SelectMethod="BundleDataSet">
    <SelectParameters>
    <asp:QueryStringParameter Name="bundleID" QueryStringField="bundle" />
    </SelectParameters>
    </asp:ObjectDataSource>

    <telerik:RadGrid id="panelGrid" runat="server" DataSourceID="BundleItemsSource" Height="100%" Width="100%">
    <ClientSettings>
    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    <ClientEvents OnGridCreated="gridCreated" />
    </ClientSettings>
    </telerik:RadGrid>

    </asp:Content>

    最佳答案

    更改 Assembly 属性以删除特定版本、公钥等显然解决了问题。

    关于asp.net - 元素 'RadGrid' 不是已知元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7727663/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com