Hi friends,
I need of some help,
I have this code:
For Each t As TextBox In Page.Controls ' here is the error
t.Text = "test"
Next
But I am getting this error:
Unable to cast object of type 'ASP.masterpages_maindesign_master' to type
'System.Web.UI.WebControls.TextBox'.
Please help me to understand this error and solve the problem
Thanks in advance
Sebastian - 24 Apr 2006 09:09 GMT
Hi Avon,
"Page.Controls" - you're probably in your masterpage and trying to interate
througth masterpage controls (placeholders). Try to interate t. your content
control.
Hope it helps,
Sebastian
> Hi friends,
>
[quoted text clipped - 16 lines]
>
> Thanks in advance