Tim Weaver

A .NET Blog

<September 2008>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011


Navigation

Work

Subscriptions

Post Categories



Monday, September 13, 2004 - Posts

VS 2005 Custom Control Inheritance
The VS2005 Migration Wizard doesn't seem to handle migrating user controls that have base classes defined in a separate assembly very well. The way to get this to work is to goto the source view on the user control and set the Inherits page attribute equal to namespace.classname of the assembly that contains the definition.

For example:
Assembly Name: BaseControls
Namespace: BaseControls
ClassName: UserControlBase
You would setup your page attribute in your user control to be:
<% @Control Language="C#" CompileWith="NewUserControl.ascx.cs" ClassName="NewUserControl_ascx" Inherits="BaseControls.UserControlBase" %>

posted Monday, September 13, 2004 8:22 AM by icodemarine




Powered by Dot Net Junkies, by Telligent Systems