Custom Control in ASP.NET C#

Posted by Gal V on Stack Overflow See other posts from Stack Overflow or by Gal V
Published on 2010-06-09T05:47:18Z Indexed on 2010/06/09 5:52 UTC
Read the original article Hit count: 195

Hello all,

I created a simple custom control that only inherits from the Literal control, and doesn't have any extensions yet, code is empty.

Namespace: CustomControls

Class name: Literal : System.Web.UI.WebControls.Literal

Next thing I do is registering this control in the aspx page as following:

<%@ Register TagPrefix="web" Namespace="CustomControls" %>

(I read in few tutorials that this is one of the ways to register it, besides web.config etc.)

After all, no intellisence for me, and worse- I get a parse error 'unknown server tag: web' when I try to run the page with the control in it.

I used 'create new project' and not new website, in case this info is needed.

What could be my problem?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about custom-controls