I have a TextBox inside ItemTemplate of a Repeater that is also inside a ItemTemplate.
Server side I have:
protected void txtValorMaterialAsign_TextChanged(object sender, EventArgs e)
{
string controlId = ((TextBox)sender).ClientID;
}
which results in:
rptFilasDeUnMaterial_ctl04_txtValorMaterialAsign
But client side the Id for that control is (according to Chrome’s F12):
ctl00_contenido_wucMateriales_rptMateriales_ctl00_rptFilasDeUnMaterial_ctl01_txtValorMaterialAsign
How can I get the full Id from server side code?
This worked for me:
returns:
Try
UniqueIDon your simple findControl. If that does not work, nest the findControls.