.net v2输出与指定ID不同的ID [英] .net v2 output different ID's from the ones specified

查看:119
本文介绍了.net v2输出与指定ID不同的ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我在一个网页上有一个奇怪的行为,我想了解它,何时,何地以及如何更正此问题.在.net v1.1.4上,该代码可以完美地工作:

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:

在数据网格事件"itemdatabound"的代码后面:

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");)

ddlist.Attributes.Add("onChange", "dropDownItemChange(''" & txtBoxDropDownID.ID & "'',''" & txtBoxDropDownIndex.ID & "'',''DataGridActividades__ctl" & (e.Item.ItemIndex + 2).ToString() & "_dropDownestadoInscricao'');")

渲染的:

 

 < select name ="DataGridActividades:_ctl2:dropDownestadoInscricao" id ="DataGridActividades __ ctl 2 _dropDownestadoInscricao" name ="dropDownestadoInscricao"

 <select name="DataGridActividades:_ctl2:dropDownestadoInscricao" id="DataGridActividades__ctl2_dropDownestadoInscricao" name="dropDownestadoInscricao"

class ="InputStyle" 

class="InputStyle"  

onChange ="dropDownItemChange(''txtBoxDropDownID'',''txtBoxDropDownIndex'',''DataGridActividades __ ctl 2 _dropDownestadoInscricao''); "

onChange="dropDownItemChange(''txtBoxDropDownID'',''txtBoxDropDownIndex'',''DataGridActividades__ctl2_dropDownestadoInscricao'');"

style ="background-color:Transparent; border-width:0px; width:130px;">

 

然后在.net v2上,相同的代码将呈现以下内容:

then on .net v2 the same code renders the following:

 

发送“验证码”获取 | 15天全站免登陆