Yes It is possible. Here is the code to do it.
Dim _myControl As Control = Page.FindControl("UserControlName")
Dim _myControlType As Type = _myControl.GetType()
Dim _myControl_Property As PropertyInfo =
_myControlType.GetProperty("PROPERTYNAME")
sTemp = _myControl_Property.GetValue(_myControl, Nothing)
Hope this helps.
Ryan
"trinitypete" <> wrote in message
news:0c6201c33b29$2351b0c0$...
> Webpage1 is a standard ASP.NET webform which contains the
> user control. I know I can access properties of the user
> control via the HTML of webpage1 i.e.
> <uc1:LoginUserControl id="LoginUserControl1"
> property1="Hello" property2="Goodbye"
> runat="server"></uc1:LoginUserControl>
>
> but is it possible to access the properties from webpage1
> code behind page.
>
> Hope this is a little clearer.
> Pete.
>
> >-----Original Message-----
> >What exactly is "webpage1?"
> >
> >HTH,
> >
> >Kevin Spencer
> >Microsoft FrontPage MVP
> >Internet Developer
> >http://www.takempis.com
> >Big things are made up of
> >lots of Little things.
> >
> >"trinitypete" <> wrote in message
> >news:0a9501c33b1f$732d7610$...
> >> I have a user control that is basically a login
> dialogue.
> >> If I add the user control to webpage1, can I access the
> >> properties directly from C# codebehind, or do I have to
> >> access the properties from HTML behind webpage1.
> >>
> >> Thanks in advance. Pete
> >
> >
> >.
> >