Auto code generation overrides my control in base class

  • Thread starter Thread starter mirek
  • Start date Start date
M

mirek

Hi,
I'm looking for a workaround on following problem: my page derives from
base page class, this base class has a web control member and on every
derived pages in html I put a tag with id of this control. But when I
switch to design mode and save th page. The control is auto generated in
the code behind classes, which overrides the declaration in the base page.
How to solve it? TIA

Regards,
mirek
 
It is well-known feature of VS.NET IDE. You should add your modification
outside of region for auto-generated code.
 
Yuri said:
It is well-known feature of VS.NET IDE. You should add your modification
outside of region for auto-generated code.

Could you specify exactly where to put this code? I see only one
auto-generated code region in my derived class and there are only
methods InitializeComponent and OnInit methods. The member that is
autogenerated is not in this region. Maybe in aspx files should I mark a
fragment to not be autogenerated and this would make sense (if yes, what
is the syntax to write it?).

Regards,
mirek
 
Back
Top