all groups > asp.net webcontrols > october 2004 >
You're in the

asp.net webcontrols

group:

Putting user controls inside a templated DataList (ASP 2.0)


Putting user controls inside a templated DataList (ASP 2.0) Roger Helliwell
10/27/2004 9:05:26 PM
asp.net webcontrols:
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
RE: Putting user controls inside a templated DataList (ASP 2.0) vbMental
10/30/2004 7:25:02 PM
I tried it and had problems too. Was it a checkbox list you were using inside
your user control?
[quoted text, click to view]
Re: Putting user controls inside a templated DataList (ASP 2.0) Roger Helliwell
10/31/2004 2:57:15 AM
On Sat, 30 Oct 2004 19:25:02 -0700 in
microsoft.public.dotnet.framework.aspnet.webcontrols, "vbMental"
[quoted text, click to view]

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
Re: Putting user controls inside a templated DataList (ASP 2.0) vbMental
10/31/2004 3:15:02 PM
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.

[quoted text, click to view]
AddThis Social Bookmark Button