Circular references are not supported

Discussion in 'ASP .Net' started by Dan C Douglas, Aug 13, 2003.

  1. I have a user control, and I would like to create another instance of the
    user control inside the same user control.

    I am doing this because the user control has a datagrid, and in the datagrid
    I instantiate a reference to a new instance of the same ascx file that I am
    currently on and place it in the datagrid. I am recursing through records
    and only create a new instance if sub-records exist for the record I am
    currently on in the datagrid.

    What do you guys suggest as a workaround? I'd like to code it to allow an
    unlimited amount of sub levels to be shown in the hierarchy.

    Any ideas on how to get around this issue ?

    Thanks,

    Dan
    Dan C Douglas, Aug 13, 2003
    #1
    1. Advertising

  2. I'd suggest you create a custom control instead of a user control. They are
    more sophisticated (and complex) so they allow for more advanced features
    like you're trying to implement.
    Here's more info:
    http://msdn.microsoft.com/library/d...l/vbconWebUserControlsVsCustomWebControls.asp
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriwebusercontrols.asp
    http://msdn.microsoft.com/library/d...n/html/vbconintroductiontowebusercontrols.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net
    Developer for Hire


    "Dan C Douglas" <> wrote in message
    news:...
    > I have a user control, and I would like to create another instance of the
    > user control inside the same user control.
    >
    > I am doing this because the user control has a datagrid, and in the

    datagrid
    > I instantiate a reference to a new instance of the same ascx file that I

    am
    > currently on and place it in the datagrid. I am recursing through records
    > and only create a new instance if sub-records exist for the record I am
    > currently on in the datagrid.
    >
    > What do you guys suggest as a workaround? I'd like to code it to allow an
    > unlimited amount of sub levels to be shown in the hierarchy.
    >
    > Any ideas on how to get around this issue ?
    >
    > Thanks,
    >
    > Dan
    >
    >
    >
    Steve C. Orr, MCSD, Aug 13, 2003
    #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. BBuff
    Replies:
    0
    Views:
    2,460
    BBuff
    Sep 26, 2005
  2. Kiuhnm
    Replies:
    16
    Views:
    741
    Jonathan Mcdougall
    Jan 3, 2005
  3. Dan C Douglas

    Circular references are not supported

    Dan C Douglas, Aug 13, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    141
    Steve C. Orr, MCSD
    Aug 13, 2003
  4. Dan C Douglas

    Circular references are not supported

    Dan C Douglas, Aug 13, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    118
    Steve C. Orr, MCSD
    Aug 13, 2003
  5. Dan C Douglas

    Circular references are not supported

    Dan C Douglas, Aug 13, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    115
    Steve C. Orr, MCSD
    Aug 13, 2003
Loading...

Share This Page