Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PageLoad (and other methods) becoming unhooked ..... 1

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
I'm seeing something annoying when working with ASP.NET web pages (as created in Visual Studio).
Every now and again - some of the methods are becoming unhooked from the visual components on the web forms.
The 'PageLoad' event is a prime example of this.
What I mean, is that I can be developing against a form, and suddenly when I'm testing it I find that a lot of the code I've set to run just plain simply isn't being called ....
I then have to re-hook the events under the hood.
Can anyone suggest what's causing this ?
And how I can prevent it ?
Thanks in advance
Steve
 
Are you dynamically loading user controls?

Check your postback state on page_load if so

Cheers
SJ
 
Do you mean setting up methods against components as and when I load the form ?
No - I'm not.
Sometimes I just lose the 'PageLoad' event - but just recently (this morning - prompting me to throw in this forum post) I lost all events against the components on the web form. [grrrr!!!].
Any further thoughts ?
Steve
 
VS eats code sometimes. I think it has something to do with changing ID's of controls, but I'm not 100% on that.

I have been dealing with it for the past 3.5 years, so let's hope they fix it w/ VS2005.

-paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
There's no patch or service pack for VS that would rectify this ?
My worry is that I lose some methods and this goes un-noticed until the end-user finds it [as careful as we might be when developing].
Is there anything else I can be doing to help limit this from occuring ?
Thanks again.
Steve
 
Not that I've found, no. End users have found mine quite a few times. I agree it's not a good thing, but I have yet to find anything to stop it.

There are plenty of people complaining, though, so like I said, hopefully VS2005 will have a fix in it.

-p

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top