Putting user controls inside a templated DataList (ASP 2.0)

R

Roger Helliwell

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
 
V

vbMental

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

Roger Helliwell

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
 
V

vbMental

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top