473,418 Members | 2,087 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,418 software developers and data experts.

Events getting deleted

Hi,

I am using c# as my code for ASP.Net and getting some annoying behaviour

I am creating custom handlers for events in the InitializeComponent section
of a user control but when I redesign the form they are getting deleted and
replaced by the Handlers for all of the controls in the form.

Also, I have changed some of controls from protected to public, these also
get overwritten.

Is there a way of stopping this?

Thanks for an help

Steve Lloyd
Nov 17 '05 #1
1 1105
hi,

you should not change nothing inside the #region used by the designer, if
you do so you SHOULD not change to design mode again.

InitializeComponent happens to be there, hence you should not change it.

can you use the form_load or the constructor instead?

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Steve Lloyd" <st****************@livenowpaylater.co.uk> wrote in message
news:eC**************@TK2MSFTNGP14.phx.gbl...
Hi,

I am using c# as my code for ASP.Net and getting some annoying behaviour

I am creating custom handlers for events in the InitializeComponent
section of a user control but when I redesign the form they are getting
deleted and replaced by the Handlers for all of the controls in the form.

Also, I have changed some of controls from protected to public, these also
get overwritten.

Is there a way of stopping this?

Thanks for an help

Steve Lloyd

Nov 17 '05 #2

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

Similar topics

1
by: Glenn | last post by:
I have just started using the FileSystemWatcher in VB.NET. My first attempt was to connect to a share, using unc paths, to a server running Win2000. Everything was working great for about two...
2
by: Kory Pukash | last post by:
I have an asp.net(2003) form that uses web server controls event architecture. The form has edit, cancel, save, delete buttons on it. When the delete button is clicked the following events fire. ...
0
by: _Christopher\(M2M\) | last post by:
Why is VS 2003 C++ moving my events from my programme, it run OK. :-) But soon as I change to the Design form some of the events have been deleted! The only thing I can find that sound like...
3
by: Sasha | last post by:
Hi everyone, Here is my problem: I have the following classes: - DataNode - this class is designed to hold some data and will be contained in a tree like data structure DataTree. When...
15
by: Rhy Mednick | last post by:
I have a class (let's call it ClassA) that I've written which has events. In another class (let's call it ClassB) I create a collection of ClassA objects. In a third class (ClassC) I create a...
5
by: Rekkie | last post by:
Hi, All of our developers using C# VS.Net 2003 to develop websites are having problems with Events being deleted from their code by Visual Studio. It seems that object events defined in the...
5
by: Jon Maz | last post by:
Hi there, I am experimenting with the FileSystemWatcher object. I have set the NotifyFilter as follows: myFileSystemWatcher.NotifyFilter = NotifyFilters.Security | NotifyFilters.CreationTime...
10
by: Kai Thorsrud | last post by:
Hi i'm an event Noob and i'm calling a class from my main module console app like this. I'm sorry if this is a lot of code to read but i can't see the error according to my book. Thanks a LOT. ...
16
by: anonymous.user0 | last post by:
The way I understand it, if I have an object Listener that has registered as a listener for some event Event that's produced by an object Emitter, as long as Emitter is still allocated Listener...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.