Solved

Problems with @Register in VS2005

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now