The Controls property of UpdatePanel with ID '...' cannot be modified directly....
Eğer projenizde update panel'i runtime'da eklemiş vede bu panel'e runtime'da kontrol eklemeye çalıştığınızda
The Controls property of UpdatePanel with ID '...' cannot be modified directly. To change the contents of the UpdatePanel modify the child controls of the ContentTemplateContainer property.
hatası alıyorsanız bunun anlamı update panel'in controls classına direk bir control eklemeye çalışmanızdır.
Dim upd As UpdatePanel = New UpdatePanel
Dim txt As TextBox = New TextBox
upd.Controls.Add(txt)
gibi ...
Bu hatadan kurtulmanız için yapmanız gereken şeyse
Dim upd As UpdatePanel = New UpdatePanel
Dim txt As TextBox = New TextBox
upd.ContentTemplateContainer.Controls.Add(txt)
şeklinde update panel'in ContentTemplateContainer'ının control class'ına ekleme yapmak.
Ref : http://foros.dotnetclubs.com/forums/thread/1401.aspx
The Controls property of UpdatePanel with ID '...' cannot be modified directly. To change the contents of the UpdatePanel modify the child controls of the ContentTemplateContainer property.
hatası alıyorsanız bunun anlamı update panel'in controls classına direk bir control eklemeye çalışmanızdır.
Dim upd As UpdatePanel = New UpdatePanel
Dim txt As TextBox = New TextBox
upd.Controls.Add(txt)
gibi ...
Bu hatadan kurtulmanız için yapmanız gereken şeyse
Dim upd As UpdatePanel = New UpdatePanel
Dim txt As TextBox = New TextBox
upd.ContentTemplateContainer.Controls.Add(txt)
şeklinde update panel'in ContentTemplateContainer'ının control class'ına ekleme yapmak.
Ref : http://foros.dotnetclubs.com/forums/thread/1401.aspx
Yorumlar