D
dawidg
I have an asp.net page with viewstate disabled. I have a control on
the page that dynamically creates controls inside itself, no
viewstate. The controls aren't created in Init, but in Load.
With Viewstate disabled, a few hidden inputs appear in the beginning
of the page, all name h_*. Nowhere in my code do I create these. The
problem is that these hidden input create errors on postback if my
controls doesn't create the same number of controls. this is the
error:
An error has occurred because a control with id 'ctl14' could not be
located or a different control is assigned to the same ID after
postback. If the ID is not assigned, explicitly set the ID property of
controls that raise postback events to avoid this error.
Here's the inputs I'm talking about:
<body>
<form name="form1" method="post" action="Module.aspx?
tvid=32&TableId=10&ViewType=1" id="form1">
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT"
value="" />
<input type="hidden" name="h_ctl14" id="h_ctl14" value="" />
</div>
Why are these h_* inputs created?
the page that dynamically creates controls inside itself, no
viewstate. The controls aren't created in Init, but in Load.
With Viewstate disabled, a few hidden inputs appear in the beginning
of the page, all name h_*. Nowhere in my code do I create these. The
problem is that these hidden input create errors on postback if my
controls doesn't create the same number of controls. this is the
error:
An error has occurred because a control with id 'ctl14' could not be
located or a different control is assigned to the same ID after
postback. If the ID is not assigned, explicitly set the ID property of
controls that raise postback events to avoid this error.
Here's the inputs I'm talking about:
<body>
<form name="form1" method="post" action="Module.aspx?
tvid=32&TableId=10&ViewType=1" id="form1">
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT"
value="" />
<input type="hidden" name="h_ctl14" id="h_ctl14" value="" />
</div>
Why are these h_* inputs created?