Re: Post Back Predicament
- From: "Eliyahu Goldin" <removemeegoldin@xxxxxxxxxxxxxx>
- Date: Wed, 12 Jul 2006 10:18:25 +0200
Tyler,
Did you consider putting the controls in a repeater? You could make a
datasource that would hold data necessary for creating the controls and
databind the repeater to that datasource. The controls could be arranged in
the repeater item template and the repeater would build as many items as
required.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
<tyler.lloyd@xxxxxxxxx> wrote in message
news:1152682410.462027.112860@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I am trying to develop an asp.net 2.0 page that dynamically adds
controls (Textbox Fields) to a page depending on items selected from a
treeview. I have however run into a bit of a tricky problem, I require
the controls to be added in a certain order (some controls should be
above others). This causes all kinds of fun when the data is posted
back. If a new control was added and it is positioned before existing
controls on the page it causes the control IDs to become de-synced.
For Example: A user adds five controls and fills in the text fields
then decides to add another control. When the new control is added all
the previously enter data disappears as all the control IDs no longer
match. (I tried setting the Control ID manually; it must be using
another ID)
The only way I can see around this is to pre-populate the whole page
with every control then hide the ones not selected (But this would not
scale well at all). Does anyone have any ideas? Or am I missing
something simple?
Any help would be most appreciated.
Thanks
Tyler
.
- References:
- Post Back Predicament
- From: tyler . lloyd
- Post Back Predicament
- Prev by Date: Re: Application variables not resetting
- Next by Date: Re: Newbies Question on data variables
- Previous by thread: Post Back Predicament
- Next by thread: How to store treeview expanded node status after page reload ?
- Index(es):
Relevant Pages
|