Peter, The object is defined with the following code:
<asp:TextBox id="Company" runat="server" MaxLength="50"
size="50"></asp:TextBox>
As opposed to being defined in vb code such as:
Private Sub CreateMyMultilineTextBox()
' Create an instance of a TextBox control.
Dim textBox1 As New TextBox()
' Set the Multiline property to true.
textBox1.Multiline = True
' Add vertical scroll bars to the TextBox control.
textBox1.ScrollBars = ScrollBars.Vertical
' Allow the RETURN key to be entered in the TextBox control.
textBox1.AcceptsReturn = True
' Allow the TAB key to be entered in the TextBox control.
textBox1.AcceptsTab = True
' Set WordWrap to True to allow text to wrap to the next line.
textBox1.WordWrap = True
' Set the default text of the control.
textBox1.Text = "Welcome!"
End Sub
With the object being set as a web form control how can I make it public ?
Thanks
Murphy
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:uZ**************@TK2MSFTNGP12.phx.gbl...
You set the visibility in code, where you define the object. Look in your
code-behind.
"Murphy" <mu****@murphy.com> wrote in message
news:#p**************@TK2MSFTNGP11.phx.gbl... Thanks Peter,
This is inline with what I discovered in google however I am new to asp.net and don't understand what this involves.
Does this mean including a including a html "Public" tag in the ascx or
similar ?
Thanks
Murphy
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:uA**************@TK2MSFTNGP09.phx.gbl... You have to wrap access to your form fields using properties or
methods, or make your form fields public.
"Murphy" <mu****@murphy.com> wrote in message
news:Oo**************@TK2MSFTNGP09.phx.gbl...
> I've read through the google posts on this topic and am still
unclear of the
> solution.
>
> Simply I have a user control that contains form controls and I would
like to
> reference the values in the form from the aspx page that contains
the user > control. The error message received is:
> Compiler Error Message: BC30390: 'ASP._userdetails_ascx.Company' is
not > accessible in this context because it is 'Protected'.
>
> Thanks
>
> Murphy
>
>