web custom control doesn't parse

X

xamman

i have the same problem as this earlier post (unfortuneately he never
received a reply)
any suggestions? thx


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,
 
X

xamman

i've figured out how to get it work.

instead of creating a web app project and adding the custom control
project to it and a reference, create the custom control project first.
 

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

Top