我正在尝试使用
RowClickableGridView
上提供的课程
this Stack Overflow post
. 这是我第一次尝试创建自定义服务器控件,并遵循中列出的步骤
this MSDN walkthrough
我有
行可单击网格视图
课堂
App\_Code
命名空间为的Web应用程序项目的目录
MyWebApplication.App\_Code
我的问题是
.aspx
我尝试在其上使用控件的页面无法识别标记前缀。该页面还包含多个警告,用于警告服务器之间不支持的元素
cc1:GridViewRowClickable
代码片段
<%@ Page Title="MyPage" Language="C#" MasterPageFile="~/MyMaster.master" AutoEventWireup="true" Inherits="MyPage" Codebehind="MyPage.aspx.cs" %>
<%@ Register TagPrefix="cc1" TagName="RowClickableGridView" Namespace="MyWebApplication.App_Code" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" SelectCommand="MySpName" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
<cc1:RowClickableGridView ID="GVW_test" runat="server" DataSourceID="SqlDataSource1">
<HeaderStyle CssClass="ListTop" />
<RowStyle CssClass="RowHighlight" />
<Columns>
<asp:BoundField HeaderText="ID" DataField="Atr_ID" SortExpression="Atr_ID" />
<asp:BoundField HeaderText="Name" DataField="Atr_Name" SortExpression="Atr_Name" />
</Columns>
<EmptyDataTemplate>
No Data
</EmptyDataTemplate>
</cc1:RowClickableGridView>
</asp:Content>
你知道我做错了什么,或者对下一步该怎么做有什么建议吗?