I use the following directive in my aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="myWebParts._Default" %>
<%@ Register Namespace="myWebParts" TagPrefix="myWebParts_tag" %>
And my page has code snippet like this:
<ZoneTemplate>
<myWebParts_tag:HelloWorldWebPart runat="server" ID="_wp1" />
</ZoneTemplate>
But I got the following error:
Parser Error Description: An error occurred during the parsing of a
resource required to service this request. Please review the following
specific parse error details and modify your source file
appropriately.Parser Error Message: Unknown server tag
‘myWebParts_tag:HelloWorldWebPart’.
What’s wrong? Thanks.
Your register directive is missing either an
assemblyor asrcinformation.assembly="AssemblyName".src="LocationOfUserControl.ascx.See MSDN for more info on the @Register directive.