I
Ian
When you add a control to the web form designer in VS.NET, say a label
called "InheritanceTestLabel", VS.NET automatically adds the following
line to the code-behind.
protected new System.Web.UI.WebControls.Label InheritanceTestLabel;
I would like to inherit the code-behind from a class that already has
this protected member field. If you leave the line in the inherited
code-behind VS.NET complains that you need the new keyword cause
you're hiding the base class field.
Is there a way to disable this auto-code-behind behavior? Or ideally
for it to be smart enough to only add controls if they're not present
in the base class? If theres not a way to get rid of it, is there a
way to conditionally compile around it or something?
Ian
called "InheritanceTestLabel", VS.NET automatically adds the following
line to the code-behind.
protected new System.Web.UI.WebControls.Label InheritanceTestLabel;
I would like to inherit the code-behind from a class that already has
this protected member field. If you leave the line in the inherited
code-behind VS.NET complains that you need the new keyword cause
you're hiding the base class field.
Is there a way to disable this auto-code-behind behavior? Or ideally
for it to be smart enough to only add controls if they're not present
in the base class? If theres not a way to get rid of it, is there a
way to conditionally compile around it or something?
Ian