Jon,
It's just a property definition. In VB it would be:
Public Property TextBoxText() As String
Get
Return TB1.Text
End Get
Protected Set(ByVal value As String)
TB1.Text = value
End Set
End Property
You define this in the user control. It's not to be placed within any other
function such as page_load. It's considered a function by itself. To set it,
you would use
sub page_load()
ccp2.TextBoxText = "some text"
End sub
within the page that contains the usercontrol it.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot comwrote in message
news:uZ**************@TK2MSFTNGP05.phx.gbl...
>i have no way of using that type of coding.
what's the vb inline code equivalent of this ?
sub page_load()
>public string TextBoxText
{
get
{
return TB1.Text;
}
set
{
TB1.Text = value;
}
}
End sub
"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:%2********************@TK2MSFTNGP06.phx.gbl.. .
>Your best bet may be to expose the text property of the textbox instead.
You would do this as a property for the control such as:
public string TextBoxText
{
get
{
return TB1.Text;
}
set
{
TB1.Text = value;
}
}
I've found that this works nicer than trying to find controls since you
don't have to worry about testing for null values.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot comwrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl. ..
>>>i have a textbox control inside a custom server control that needs to be
prefilled with content.
how do i find this child control ?
<ew:cp id="ccp2" TitleText="" runat="server">
<asp:TextBox id=TB1" runat="server" />
</ew:cp>