Weird behaviour of VS.NET
I create ASP.NET application.
codebehind file contain following area:
I add events handlers there manually. But every once in a while VS.NET review this region and erase my lines
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
private void InitializeComponent()
The questions are:
1. Is this really a result of VS.NET activity?
2. If yes then how can I change behaviour of VS.NET?
3. If not then can anybody explain me what is going on?
thanking you in anticipation
We'll never stop livin' this way
"do not modify the contents of this method with the code editor"
Why do you insist on doing what they told you NOT to do?
To answer 1 and 3: My guess it that something is being done elsewhere to the page (perhaps adding components to it) that causes this code to be rewritten automatically to account for the changes. It probably just does an overwrite of the code, hence the warning not to do any changes to it yourself, lest they be wiped out at a later point.
The erase activity might be due to RAM problem.
I have also faced with this problem.
I think u have only 128KB RAM.
Add one more 64KB.
it will be ok.i hope so.
CardboardHammer had it right. The visual ide will change that code on a whim, has nothing to do with ram.
There are two parts to the page you need to be aware of.
InitializeComponent <- DO NOT MODIFY
Page_Init <- HERE YOU CAN PUT YOUR HANDLERS
Page_Init actually calls InitializeComponent (doesn't show visibly sometimes, because it does so by default), so insert your handlers after that call inside the Page_Init event.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)