I have a repeater control and one of the items is a dynamically generated Textbox. I'm setting the id of this textbox in the item data bound event. When the user changes the value in the textbox I'm trying to cause a postback and retrieve the value. The
page I'm working on has the following fields.
ProductId, ItemPrice, PriceToBeDectuded(this is the textbox), AdjustedPrice(difference between ItemPrice and PriceToBeDectuded.
The issue I'm having is getting the value of PriceToBeDectuded in the post back when the user changes the textbox value.
This is how I'm setting the textbox value and id.
In the aspx page - this is in the item template
<asp:Textbox runat="server" id="txt"></asp:Textbox>
Item data bound event
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) {
Textbox Textbox = e.item.findcontrol("txt");
Textbox.clientidmode == ...
Go to the complete details ...