Using the same User Control multiple times on one page

Discussion in 'ASP .Net Building Controls' started by Raith, Jul 6, 2005.

  1. Raith

    Raith Guest

    How can I reuse a User Control multiple times on a single page?
    I have one created that pulls and hyperlinks the most recent news items from the database.
    I want to reuse it multiple times, one instance in each javascript dropdown menu on the page.
    I plan to pass the catagoryID via each individual menu node, but my problem is in trying to register and reuse this control.
    One always shows up alright and the other has nothing. I have tried registering twice above, using different prefixes, using different tags, etc.
    Is it possible to reuse a control like this several times on the same page?

    Thanks.

    From http://www.developmentnow.com/g/10_0_0_0_0_0/dotnet-framework-aspnet-buildingcontrols.htm

    Posted via DevelopmentNow.com Groups
    http://www.developmentnow.com
     
    Raith, Jul 6, 2005
    #1
    1. Advertising

  2. Raith

    Guest

    I create controls and reuse them an unlimited number of times in a
    page.

    Dim X as new coolControl()
    Dim Y as new coolControl()

    Controls.Add(X)
    Controls.Add(Y)

    I dont know the specifics from YOUR control, but i have over 50
    controls, some extended from others, some brand new. Good luck
     
    , Jul 7, 2005
    #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. David Hubbard
    Replies:
    2
    Views:
    848
    David Hubbard
    Jan 12, 2006
  2. Gummy
    Replies:
    9
    Views:
    471
    Sean Chambers
    Sep 19, 2006
  3. Jack Steven
    Replies:
    2
    Views:
    454
    Chris Rebert
    Mar 9, 2009
  4. Replies:
    1
    Views:
    697
    Alessandro Zifiglio
    Jul 18, 2006
  5. yk
    Replies:
    6
    Views:
    158
    Evertjan.
    Sep 13, 2006
Loading...

Share This Page