Problem with VS 2003 and Events

T

tshad

One of the differences with building one page style in DW and code behind in
VS 2003 is you have to declare the events (apparently).

For some reason my events will disapper.

For example:

I have the the following events in my InitializeComponents section:

this.Load += new System.EventHandler(this.Page_Load);
this.Load += new System.EventHandler(this.Page_PreRender);

and after making a couple of changes in my Properties page for my DataGrid,
I kept coming up with a blank screen (DataGrid was not filling).

After putting a break on the function that was called in the Page_Load
function, I found that it never went to the break.

When I looked in my InializeComponents section, I found this:

this.Load += new System.EventHandler(this.Page_PreRender);

My Page_Load event had disappeared. I can't accidently delete it since the
InitializeComponents section is hidden.

So what deleted it?

Thanks,

Tom
 
T

tshad

It seems to do it ANYTIME I change the DataGrids properties in the Property
window.

When I open the property window and just select a property, it doesn't do
it. But when I actually change one of the properties and immediatly look at
the code window (even while the Property window is still open), the event
line is gone. This only seem to be the Page_Load event that it takes out.

Tom
 

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

Top