Auto code generation overrides my control in base class

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
 
Y

Yuri Belenky

It is well-known feature of VS.NET IDE. You should add your modification
outside of region for auto-generated code.
 
M

mirek

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top