Solved

Problems with @Register in VS2005

Posted on 2006-06-22
1
333 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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