E
Emilio
Hi,
I have a user control with a datalist. Each datalistitem has a label which
is databound, a hidden textbox which is databound, a textbox and a checkbox.
like follows:
<asp:datalist id="dlBottleSize" runat="server" width="285px"
EnableViewState="True">
<ItemTemplate>
<table class="formtable">
<tr>
<td class="blue" style="width:40%;">
<input type="hidden" id="txtMeasurementID" value="<%#
container.dataitem(0) %>" runat=server/>
<asp:Label ID=lblSize text="<%# container.dataitem(1) %>"
Runat="server"/>
</td>
<td class="white" style="width:35%;text-align:center;">
<asp:TextBox ID="txtBottleSize" Cssclass="NormalTextBox" Width="25"
Runat="server" />
</td>
<td class="white" style="width:25%;">
<asp:CheckBox ID="chkListBottleSize" Runat="server" />
</td>
</tr>
</table>
</ItemTemplate>
</asp:datalist>
The issue however is that the values for the textbox and the checkbox are
not picked up after a postback, the viewstate is working and a
request.form.get() returns the values but a
Ctype(datalistitem.findcontrol("ControlID"), ControlType).property doesn't
pick-up the text entered into the textbox or whether the checkbox is
checked. Is it just because there is a full moon here at the moment?
Many thanks
Emilio
I have a user control with a datalist. Each datalistitem has a label which
is databound, a hidden textbox which is databound, a textbox and a checkbox.
like follows:
<asp:datalist id="dlBottleSize" runat="server" width="285px"
EnableViewState="True">
<ItemTemplate>
<table class="formtable">
<tr>
<td class="blue" style="width:40%;">
<input type="hidden" id="txtMeasurementID" value="<%#
container.dataitem(0) %>" runat=server/>
<asp:Label ID=lblSize text="<%# container.dataitem(1) %>"
Runat="server"/>
</td>
<td class="white" style="width:35%;text-align:center;">
<asp:TextBox ID="txtBottleSize" Cssclass="NormalTextBox" Width="25"
Runat="server" />
</td>
<td class="white" style="width:25%;">
<asp:CheckBox ID="chkListBottleSize" Runat="server" />
</td>
</tr>
</table>
</ItemTemplate>
</asp:datalist>
The issue however is that the values for the textbox and the checkbox are
not picked up after a postback, the viewstate is working and a
request.form.get() returns the values but a
Ctype(datalistitem.findcontrol("ControlID"), ControlType).property doesn't
pick-up the text entered into the textbox or whether the checkbox is
checked. Is it just because there is a full moon here at the moment?
Many thanks
Emilio