web custom control doesn't parse

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top