I'm trying to create dynamic controls which type and ID depends on some row data retrieved from a database.
For example if the data column "productType" is "1", then create a textbox with ID the same as the column "productID".
I've tried using a Repeater. But the problem is there seems to be no way to retrieve the value of a particular field to a variable (instead of a data-binding element) and then set the ID of the textbox as the control is rendered. I searched around and seems like most solutions point to iterating the repeater, finding the control, and then setting the properties.. but it won't work in this case because I'm not sure how to find the appropriate control in the first place.
Thanks in advance!
For example if the data column "productType" is "1", then create a textbox with ID the same as the column "productID".
I've tried using a Repeater. But the problem is there seems to be no way to retrieve the value of a particular field to a variable (instead of a data-binding element) and then set the ID of the textbox as the control is rendered. I searched around and seems like most solutions point to iterating the repeater, finding the control, and then setting the properties.. but it won't work in this case because I'm not sure how to find the appropriate control in the first place.
Thanks in advance!