Events getting deleted

  • Thread starter Thread starter Steve Lloyd
  • Start date Start date
S

Steve Lloyd

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
 
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,
 

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

Back
Top