Hello,
i'm having a strange behavior on a webpage that i want to understand, when, where and how to correct this. On .net v1.1.4 this code worked flawlessly:
on code-behind on the datagrid event 'itemdatabound':
ddlist.Attributes.Add("onChange", "dropDownItemChange('" & txtBoxDropDownID.ID & "','" & txtBoxDropDownIndex.ID & "','DataGridActividades__ctl" & (e.Item.ItemIndex + 2).ToString() & "_dropDownestadoInscricao');")
rendered:
<select
name="DataGridActividades:_ctl2:dropDownestadoInscricao"
id="DataGridActividades__ctl2_dropDownestadoInscricao"
name="dropDownestadoInscricao"
class="InputStyle"
onChange="dropDownItemChange('txtBoxDropDownID','txtBoxDropDownIndex','DataGridActividades__ctl2_dropDownestadoInscricao');"
style="background-color:Transparent;border-width:0px;width:130px;">
then on .net v2 the same code renders the following:
<select
name="DataGridActividades$ctl02$dropDownestadoInscricao"
id="DataGridActividades_ctl02_dropDownestadoInscricao"
name="dropDownestadoInscricao"
class="InputStyle"
onChange="dropDownItemChange('txtBoxDropDownID','txtBoxDropDownIndex','DataGridActividades__ctl2_dropDownestadoInscricao');"
style="background-color:Transparent;border-width:0px;width:130px;">
So this renders a different ID than the one that i specified and on the rendered page it's using a javascript that will get that control from it's ID. That's why it's not working.
Thanks in advance,
Chapas