473,395 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Web UserControl inheritance in VS 2005

It seems that VS 2005 doesn't allow inheritance for web usercontrols. I
created two web UserControls, WebUserControl1 and WebUserControl2. I
replaced base class of WebUserControl2 to be WebUserControl1 (public
partial class WebUserControl2 : WebUserControl1). When compiled, got
error: "The type or namespace name 'WebUserControl1' could not be found
(are you missing a using directive or an assembly reference?)"

In VS 2003, such inheritance is allowed.

Jan 25 '06 #1
1 1085
On 25 Jan 2006 12:35:12 -0800, "Yuan" <wo**@jamesyuan.com> wrote:

In VS 2003, such inheritance is allowed.


That's because the types inside code-behind files could see each
other.

In 2005 the partial classes in CodeFiles for user controls and web
forms don't see each other unless you explicitly use an @ Register
directive.

--
Scott
http://www.OdeToCode.com/blogs/scott/

Jan 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joe | last post by:
OK, so i searched this forum, and it seems like my question has come close to being answered a dozen times, but never fully... I have a very simple control that inherits from UserControl. It has...
5
by: Pieter | last post by:
Hi, I'm getting a really terrible and anoying bug/problem in VS.NET 2005: 1. Create a new Windows Application. 2. Add a new class Class1. 3. Add a usercontrol UserControl1. 4. Add a public...
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
9
by: Marcelo Cabrera | last post by:
Hi, I have a user control that in turn creates a bunch of webcontrols dynamically and handles the events these webcontrols raise. It used to work fine on ASP .Net 1.1 but when compiled on 2.0 it...
2
by: RKT | last post by:
(Web Developer Express 2005, CSharp, C#) I've searched high and low... If have the typical _Default page. In it is a MultiView that contains another MultiView - in both of those are Views...
2
by: gerry | last post by:
based on MSPress's ASP.NET 2.0 Applications Advaced Topics ( Table 12-3 p.472 ), and most events should be automatically wired up when @Control AutoEventWireup="true". ie. Page_InitComplete() {}...
5
by: billsahiker | last post by:
I saw one post here that basically said no way, but not sure which vs version was being discussed. Using vs 2005 I develped a user control in a vb project and would like to use that usercontrol in...
2
by: Joe | last post by:
Is it possible to inherit from a UserControl? If I try my user control class is not recognized. Thanks, Joe
1
by: Stefan Hoffmann | last post by:
hi @all, I have a lot of similar looking pages (TabPage) with a lot of code behind. I want to extract these page contents to user controls. Because they have all the same basic layout and some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.