Ala'a Alnajjar

Everything about ASP.Net

October 2010 - Posts

Cannot implicitly convert type 'string' to 'System.Web.UI.WebControls.TextBox'
I faced this issue yesterday,it was very strange because it doesn't make sense at all.

I have a master page and 1 content page,in that content page there is only one TextBox and an Ajax Editor (from ASP.NET AJAX Control Toolkit),no more no less.

I tried to run the page but the debugger doesn't compile at all,it keeps showing this error message:

Cannot implicitly convert type 'string' to 'System.Web.UI.WebControls.TextBox'

It was hopeless,there isn't any server side code or even any JavaScript blocks,nothing!

After a long analysis at the source/html of my page and trying every possibility I finally found what caused the issue that I won't guess it at all:

EMPTY TITLE for my content page


That is what caused the issue,I was surprised,after removing/setting a value for the title the problem solved!

I hope my experience with this issue might help someone else,if anyone face the same issue and solved it in the same way or in a different way then please post it here,this will surely help others as well.
Posted: Oct 14 2010, 01:32 PM by alaa9jo | with 4 comment(s) |
Filed under: ,
More Posts