zondag, oktober 01, 2006

 

wtf#$@ hidden webparts, validation troubles

On a portal i'm developing (ASP.NET 2.0, C#, webservices, webparts) I ran into the following glitch!

My colleague worked on a WebPart I build and came to me asking why some evenhandlers didnt got firedup. Also the validation acted weird, allthough the summary showed up normally, the clickevent fired without page being valid. I noticed that the page had a JavaScript error and offcourse untraceable. Well what do you do in that case, you know the part worked fine when u left it there so you demolish nearly everything to get to the bone. And what do you know, still no luck #$$@#$ . More by luck then by wisdom I saw the createchildcontrols event got fired 3 times a postback/pageload... mm.. thats strange, only one part on the page.. Conclusion, there must be more then one of the same part in the profile but set to close. I reset the page, and all my troubles where gone.. how cute is that#$@

In short:
Got strange JavaScript errors on your webparts, events dont fire, validations go weird, try resetting you webparts page.