Solved

Problems with @Register in VS2005

Posted on 2006-06-22
1
335 Views
Last Modified: 2008-02-26
Hello guys

I had a VS2003 ASP.NET application, which I converted to a VS2005 Web Site Project. Now I am converting it to a VS2005 Web Application Project. Most of the things work but not the @Register directive.

I have a control class inheriting from System.Web.UI.WebControls.ImageButton. It's in a .CS file and does not have an .ASCX file. I try to register it like this in the page:

<%@ Register TagPrefix="cc1" Namespace="MyApp.MyButtons" %>

Then I use the control as:

<cc1:MyImageButton id="myButton" runat="server"></cc1:MyImageButton>

The designer underlines the tag and tells me: Element 'MyImageButton' is not a known element. This can occur if there is a compilation error in the Web site.

This worked just fine in VS2003 and also in VS2005 Web Site Project.

Any ideas?

TheAvenger
0
Comment
Question by:TheAvenger
1 Comment
 
LVL 16

Accepted Solution

by:
Swapnil Piparia earned 500 total points
ID: 16958319
Hi TheAvenger,

do one thing. Add your control's dll (in ur case compiled cs file inherited from imagebutton  ) in ur toolbox and drag and drop that control on designer. it will write whole back code on its own.


Regards,
NetSwap
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question