P
PZ
Sorry for posting again, been away for a while, just need to refresh this
issue.
I have a page on which I have 2 panels. Each panel has a DropDownList
control which is generated dynamically at init. The first panel (panel1) is
visible, while the other panel (panel2) is currently not visible.
Just wondering if there is a way around wasting time on creating the
controls for panel2, when it is not shown yet? I only want to create it when
panel2 becomes visible, but then I get into the classic page cycle problem,
where events and viewstates makes it impossible to keep values to the
dropdownlist dynamic.
Above is the simple solution. After some weeks of development, I have more
like 11 panels with alot of controls on each of them. Some dynamic, some
hardcoded items. I'm using viewstate and OnPrerender event to determine if a
panel should be visible. It works fine, but getting kind of slow when you
need to generate ALL controls and bind data at each cycle. If you need to
show one panel with one control, it's kind of frustrating that I need to
create 100+ controls before I can display that one control.
My goal is to keep everything on one aspx page, but not sure if this is the
right strategy if you have a rather large site with many functions and
controls.
Please advise.
There must be a better way to design this?
issue.
I have a page on which I have 2 panels. Each panel has a DropDownList
control which is generated dynamically at init. The first panel (panel1) is
visible, while the other panel (panel2) is currently not visible.
Just wondering if there is a way around wasting time on creating the
controls for panel2, when it is not shown yet? I only want to create it when
panel2 becomes visible, but then I get into the classic page cycle problem,
where events and viewstates makes it impossible to keep values to the
dropdownlist dynamic.
Above is the simple solution. After some weeks of development, I have more
like 11 panels with alot of controls on each of them. Some dynamic, some
hardcoded items. I'm using viewstate and OnPrerender event to determine if a
panel should be visible. It works fine, but getting kind of slow when you
need to generate ALL controls and bind data at each cycle. If you need to
show one panel with one control, it's kind of frustrating that I need to
create 100+ controls before I can display that one control.
My goal is to keep everything on one aspx page, but not sure if this is the
right strategy if you have a rather large site with many functions and
controls.
Please advise.
There must be a better way to design this?