user control

Discussion in 'ASP .Net Building Controls' started by andrew, Mar 6, 2004.

  1. andrew

    andrew Guest

    I have a user control that works fne (hits db display datalist) but on a different section of my page i want to use some datafrom the user control

    Is there a way to pass information from the control to page

    <%@ Register TagPrefix="info" TagName="DataControl" Src="datactrl.ascx" %

    and the

    <info:DataControl runat="server"/>
     
    andrew, Mar 6, 2004
    #1
    1. Advertising

  2. sure Andrew. Have you tried using get/set accessor to expose properties of
    your usercontrol.

    You can then retrieve the values in the container page doing :

    mydata1 = usercontrol1.property1
    mydata2 = usercontrol1.property2

    etc.


    "andrew" <> wrote in message
    news:...
    > I have a user control that works fne (hits db display datalist) but on a

    different section of my page i want to use some datafrom the user control.
    >
    > Is there a way to pass information from the control to page ?
    >
    > <%@ Register TagPrefix="info" TagName="DataControl" Src="datactrl.ascx" %>
    >
    > and then
    >
    > <info:DataControl runat="server"/>
     
    Alessandro Zifiglio, Mar 6, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom Rowton
    Replies:
    2
    Views:
    683
    Tom Rowton
    Aug 1, 2003
  2. vatech1993
    Replies:
    4
    Views:
    5,710
    =?Utf-8?B?U8Opcmdpbw==?=
    Dec 11, 2004
  3. Replies:
    0
    Views:
    445
  4. Mad Scientist Jr
    Replies:
    0
    Views:
    665
    Mad Scientist Jr
    Mar 22, 2006
  5. Jonathan Wood

    User Control to Control Other User Control

    Jonathan Wood, Jan 24, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    572
    Jonathan Wood
    Feb 2, 2010
Loading...

Share This Page