M
mazdotnet
Hi all,
I have Repeater dynamically adding textboxes to a placeholder and
connecting it to AjaxControlToolkit.PopupControlExtender which works
fine. I'm adding the textboxes using the following
TextBox tbxQty = new TextBox();
tbxQty.ID = "tbxQty" + id;
phUserInput.Controls.Add(tbxQty);
Now in the OnCommand I want to read the value of the textbox by using
((TextBox)FindControl("tbxQty" + id)).Text which fails because my
textbox automatically because
<input type="text" id="rptAvailableProducts_ctl01_tbxQty0" />
instead of
<input type="text" id="tbxQty0" />
How can I force it to use tbxQty0 for the generated id at runtime
instead of rptAvailableProducts_ctl01_tbxQty0? Or in the OnCommand
event is there any way to extract the value of tbxQty0 from
rptAvailableProducts_ctl01_tbxQty0?
Thanks
Maz
I have Repeater dynamically adding textboxes to a placeholder and
connecting it to AjaxControlToolkit.PopupControlExtender which works
fine. I'm adding the textboxes using the following
TextBox tbxQty = new TextBox();
tbxQty.ID = "tbxQty" + id;
phUserInput.Controls.Add(tbxQty);
Now in the OnCommand I want to read the value of the textbox by using
((TextBox)FindControl("tbxQty" + id)).Text which fails because my
textbox automatically because
<input type="text" id="rptAvailableProducts_ctl01_tbxQty0" />
instead of
<input type="text" id="tbxQty0" />
How can I force it to use tbxQty0 for the generated id at runtime
instead of rptAvailableProducts_ctl01_tbxQty0? Or in the OnCommand
event is there any way to extract the value of tbxQty0 from
rptAvailableProducts_ctl01_tbxQty0?
Thanks
Maz