add dynamically multiple controls into one panel

A

Adriano

Hi,
With ASP, I can add user contrlos inside the same Panel and then
programmatically change the view state of each one...but I don't want to have
all the controls allready loaded into the Panel when the page starts, instead
I want to call each control (from outside the page) as needed. I have tried
to declare the control class and then programmatically load and change the
view state but it din't work...

Any suggestion in how to better deal with many constrols to the same
panel/page ?

Thanks,

Adriano
 
M

Mike MacMillan

Adriano,
one thing to keep in mind when building composite controls is to make
sure the child controls exist before the LoadViewState event (such as
in the OnInit event) so their viewstate value is mapped back to them.
if you're providing custom viewstate handling, you'll have to make sure
you're dealing with valid references before mapping their values.
I want to call each control (from outside the page) as needed

can you explain this a little more in detail? how are you calling
them from outside the page? if you could post a little source code, it
would help diagnose the issue.

Mike MacMillan
 

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
474,263
Messages
2,571,062
Members
48,769
Latest member
Clifft

Latest Threads

Top