Hello,
I’m trying to create a web custom control. I’ve worked in asp.net
extensively, but this is the first time I’ve attempted a web custom control.
As a test, I created a control exactly as described in one of the
walkthroughs (except for a couple of grammatical changes that the vs.net IDE
insisted on). The one thing I did different was to compile it via the IDE
rather than the command line. But it doesn’t work.
In design mode, the page displays the following error message over the
control:
“Parser error: unknown server tag ‘Custom:FirstControl’”
At run time, it displays a parser error:
Parser Error Message: Could not load type CustomControls.FirstControl from
assembly CustomControls, Version=1.0.2137.29652, Culture=neutral,
PublicKeyToken=null.
Source Error:
Line 11: <Custom:FirstControl Message= "This control tells time. "
runat=server/>
The control identifies itself as follows:
Namespace CustomControls
Public Class FirstControl
Inherits Control
The page references it as follows:
<%@ Register TagPrefix="Custom" Namespace="CustomControls" Assembly =
"CustomControls" %>
…
<Custom:FirstControl Message= "This control tells time. " runat=server/>
I’ve confirmed that the control is compiling and that the web app is finding
the DLL. Can anyone spot what the problem is, or offer any suggestions how to
figure it out?
Thanks in advance,
eachus