Putting user controls inside a templated DataList (ASP 2.0)

Discussion in 'ASP .Net Web Controls' started by Roger Helliwell, Oct 27, 2004.

  1. Hi All,

    I have a few user controls that I want to move into the
    <HeaderTemplate> of my DataList. It seems they aren't retaining
    they're state though. (I have view state enabled)

    Is this a data binding problem? Is there a trick to using user
    controls within templates that I'm missing?

    Thanks for your help,
    Roger
    Roger Helliwell, Oct 27, 2004
    #1
    1. Advertising

  2. Roger Helliwell

    vbMental Guest

    I tried it and had problems too. Was it a checkbox list you were using inside
    your user control?
    "Roger Helliwell" wrote:

    > Hi All,
    >
    > I have a few user controls that I want to move into the
    > <HeaderTemplate> of my DataList. It seems they aren't retaining
    > they're state though. (I have view state enabled)
    >
    > Is this a data binding problem? Is there a trick to using user
    > controls within templates that I'm missing?
    >
    > Thanks for your help,
    > Roger
    >
    >
    vbMental, Oct 31, 2004
    #2
    1. Advertising

  3. On Sat, 30 Oct 2004 19:25:02 -0700 in
    microsoft.public.dotnet.framework.aspnet.webcontrols, "vbMental"
    <> wrote:

    >I tried it and had problems too. Was it a checkbox list you were using inside
    >your user control?


    The user control is comprised of a DropDownList that populates itself
    from an xml file on creation. It works fine on its own, but when it is
    put inside a HeaderTemplate or a FooterTemplate, it loses all state.

    Roger
    Roger Helliwell, Oct 31, 2004
    #3
  4. Roger Helliwell

    vbMental Guest

    Do you use databinding to fill this dropdown - because I think thats where
    the bug is. Hopefully it's fixed in the next version. Try added the items
    manually without databinding, that has worked for me.

    "Roger Helliwell" wrote:

    > On Sat, 30 Oct 2004 19:25:02 -0700 in
    > microsoft.public.dotnet.framework.aspnet.webcontrols, "vbMental"
    > <> wrote:
    >
    > >I tried it and had problems too. Was it a checkbox list you were using inside
    > >your user control?

    >
    > The user control is comprised of a DropDownList that populates itself
    > from an xml file on creation. It works fine on its own, but when it is
    > put inside a HeaderTemplate or a FooterTemplate, it loses all state.
    >
    > Roger
    >
    >
    vbMental, Oct 31, 2004
    #4
    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. Saurabh
    Replies:
    6
    Views:
    4,533
    Chris Smith
    May 30, 2004
  2. RA Scheltema
    Replies:
    3
    Views:
    399
    RA Scheltema
    Jan 6, 2004
  3. Marijn
    Replies:
    5
    Views:
    457
    Marijn
    Feb 13, 2004
  4. Replies:
    0
    Views:
    2,227
  5. Roman
    Replies:
    2
    Views:
    263
    Roman
    Jan 4, 2005
Loading...

Share This Page