Today I spent literally two hours or so fixing a .Net problem that didn’t exist. Basically I had a usercontrol that was being used throughout a site and after moving the usercontrol to the opposite side of the page it no longer functioned. The control was there, but the content of it was not. I convinced myself that there was a corruption going on after moving it from one side of the screen to another. Two hours later and after much scratching off my head, I realised the silly little problem that was staring me in the face all the time.

When I realised how stupid it was, I was pretty annoyed to have wasted so long on it. It wasn’t a programming problem, or a corruption or even some weird thing with studio. It was one little line in my css style sheet that was messing everything up. God knows why I ever did it but at some point I added a custom style for the <span> tag which basically hid everything within the <span>. Yes I’m afraid it was that stupid, god knows why I did it, it had obviously been in there a long time but I had never had the right position of an element for it to cause problems.

It wasn’t all bad though, while researching the problem I did come upon a very handy little tip for referencing user controls inside the web.config instead of having to do it in every web page. Rather than reproduce the text here I’ll just put a link to the article below, enjoy:

Custom Controls, Web Config Article

Similar Posts

« »