Problem Description:
By implementing of custom web
parts based on ASP.NET 2.0, you will probably find many examples, which simple do
not work.
One of common problems is
that the custom web part is not properly registered in the parent page.
For example, image you
implemented the web part in the namespace TextDisplayWebPart. Usually,
the web part should be registered at the parent page as shown here:
<%@ Register TagPrefix="part"
Namespace="DaenetGadgetTestWebApplication"
%>
Unofortinately, after
build process you will get fillowing error:
“Element 'TextDisplayWebPart'
is not a known element. This can occur if there is a compilation error in the
Web site.”
Solution:
Solution in this case is more
than simple. By registering of the web part in the previous example, the
assembly directive is missing:
<%@ Register TagPrefix="part" Assembly="GadgetTestWebApplication" Namespace="GadgetTestWebApplication"
%>
Posted
Sep 08 2006, 12:29 PM
by
Damir Dobric