473,388 Members | 1,526 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,388 software developers and data experts.

Auto code generation overrides my control in base class

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
Nov 18 '05 #1
2 1199
It is well-known feature of VS.NET IDE. You should add your modification
outside of region for auto-generated code.
"mirek" <mi***@wp.pl> wrote in message
news:c0*********@atlantis.news.tpi.pl...
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

Nov 18 '05 #2
Yuri Belenky wrote:
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

Nov 18 '05 #3

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

Similar topics

18
by: nenad | last post by:
Wouldn't it be nice if we could do something like this: class Funky{ public: auto virtual void doStuff(){ // dostuff } };
2
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a...
11
by: Keith | last post by:
I apologize for those of you who think I'm posting on the same topic. It is not that I don't appreciate all of your comments - and I'm definitely reading them all - but I think I have a differing...
10
by: Julia | last post by:
Hi Please can someone explain this behaviour: I have a MustInherit Base class and a Derived class that Inherits Base and Shadows a method in the base class. If I Dim a variable of type...
9
by: Alan Silver | last post by:
Hello, I have a user control which I am trying to load dynamically, but am running into problems. I think the problem is because I have two .ascx files that refer to the same .ascx.cs file. A...
2
by: slawrence | last post by:
Hi I am getting an error "Code generation for property 'SubCategoryId' failed. Error was 'Property accessor 'SubCategoryId' on object 'yyy.zzz' threw the following exception: 'Object reference...
0
by: slawrence | last post by:
Hi I am getting an error "Code generation for property 'SubCategoryId' failed. Error was 'Property accessor 'SubCategoryId' on object 'yyy.zzz' threw the following exception: 'Object reference...
1
by: Don | last post by:
I'm getting the following exception displayed in the task list at design time for my project: "Code generation for property 'Controls' failed. Error was: 'Object reference not set to an...
12
by: André | last post by:
Hi, i'm learning working with classes. In class "classbase1", i defined an overridable function. In the class "subclass1", i defined the same function with 'Overrides'. In class "classbase2", i...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.