Invalid Cast Exception with Nested Master Pages

System.InvalidCastException is apparently quite a common error in Nested Master Pages. Quite frankly, the problem seems to be completely random:

I solved my particular problem by adding batch="false" to the compilation tag:

This has some implication on performence and you can read more about it here. Update: 2 weeks later I was still...

Automated WCF RESTful System Testing with VS

I discovered a bit of a hack for automatically system test WCF services just using unit tests. Although, this is not the best testing practice, it does allow to quickly verify the behaviour of the service under several circumstances which are not easily 'testable' with simple unit tests e.g. authorized/unauthorized. Unfortunately, VS doesn't allow to...

Spacing between inline-block list elements

An irritating problem occurred today. I was using lists to create menu (tab-like). Using CSS 3, I used

and I end it up having a spacing between the elements. There was no margin between elements, no border-spacing nothing. In order to make them stick to each other I used:

and added

Accessing DbContext From a Different Project

Today, I discovered in interesting pitfall when accessing the database from different projects (inside one solution). I have defined connectionString in the Web.config file. To my dismay, this was not sufficient if you want to use your data context in different projects. Specifically, I was greeted by "Connection could not be opened" error. The inner...

ASP.NET Submit button not working (unresponsive)

ASP.NET Forms are a thing of the past... Or are they? Well... I was trying in all my power to do a cross-site data submit. Interestingly enough, the button simply didn't work. Literally, You click it and nothing happens. I did manage to fix it. How?

I removed and that fixed it.