Hi,
I am migrating my project from 2003 to asp.net 2008.My problem is about Readonly Textboxes.I have some textboxes as readonly.In 2008,i cant get values from these textboxes if readonly=true in aspx.So i write a function which converts readonly=false and add readonly attribute in run-time.It works well if my textbox is not in update panel.In Update panel,page's controls doesnt come to my class cause just one control comes.It is UpdatePanel.How can i get controls in Update Panel and how can i change it?My code is following.I call it in everypage.
Public Shared Sub clearReadOnlyTextboxes(ByVal pg As Page)
For Each c As Control In pg.Form.Controls
If c.[GetType]().ToString() = "System.Web.UI.WebControls.TextBox" AndAlso DirectCast(c, TextBox).[ReadOnly] Then
DirectCast(c, TextBox).[ReadOnly] = False
DirectCast(c, TextBox).Attributes.Add("readonly", "readonly")
End If
Next
End Sub