I have a usercontrol with a textbox.
I displayed the control programmatically on my .aspx
How could I manipulate the 'enable property' and/or bordercolor of the ucl
textbox from my .aspx page?
The simplest way is to declare the textbox as public (instead of the default
of private).
You may be able to do this by setting its Modifiers property.
Here are more details about best practices on this subject:
http://SteveOrr.net/faq/PassDataToUserControl.aspx

Signature
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
>I have a usercontrol with a textbox.
> I displayed the control programmatically on my .aspx
>
> How could I manipulate the 'enable property' and/or bordercolor of the
> ucl
> textbox from my .aspx page?
greatdane - 23 Mar 2006 21:49 GMT
This helped me... Thanks
In addition I am trying to create on my page an array of 4 strings
containing the name of 4 textboxes from my control.
Dim a(4) as string
a(0) = "txtCrownofroad"
a(1) = "txtcntyfld"
a(2) = "txtreviewzone"
a(3) = "txtreviewbfe"
Dim x As Integer
For x = 0 To a.Length
CType(ctlFReview_entry.FindControl(a(x)), TextBox).ReadOnly =
False
CType(ctlFReview_entry.FindControl(a(x)), TextBox).BorderColor =
Color.SteelBlue
Next
I am getting an error because it is not reading '.FindControl(a(x))...
> The simplest way is to declare the textbox as public (instead of the default
> of private).
[quoted text clipped - 9 lines]
> > ucl
> > textbox from my .aspx page?
Steve C. Orr [MVP, MCSD] - 23 Mar 2006 22:33 GMT
What is the error you are getting?
> This helped me... Thanks
> In addition I am trying to create on my page an array of 4 strings
[quoted text clipped - 29 lines]
>> > ucl
>> > textbox from my .aspx page?
greatdane - 24 Mar 2006 15:27 GMT
I did not write the error down; however, reading a little further from the
article the you referenced before, I decided to implented the code as follow:
It is a better approach. Thanks for your help!!
For Each Panel2_Control As Control In Panel2.Controls(0).Controls
If TypeOf Panel2_Control Is TextBox Then
CType(Panel2_Control, TextBox).ReadOnly = False
CType(Panel2_Control, TextBox).BorderColor = Color.SteelBlue
End If
Next
> What is the error you are getting?
>
[quoted text clipped - 33 lines]
>
> .