While developing a new web site using ASP.Net 2.0 recently I came across this strange error on compilation.
Cannot implicitly convert type ‘string’ to ‘System.Web.UI.WebControls.TextBox’
It took my ages to work out what the hell was the problem, which string was it trying to convert?
The problem occurred because of the new Page.Title property. I had a TextBox whose ID was also set to Title. It was therefore trying to convert the string in the Page declaration into a textbox – not gonna work! This Title property is new for ASP.Net 2.0 so you might want to watch that one in your apps.