Item id has been changed from _ctl0_ to ctl00_
当你使用masterpage的时候,页面内的服务端控件会自动加上 _ctl0_ContentPlaceHolder1 或者 ctl00_ContentPlaceHolder1,这两个有什么区别呢,
这是因为.net 1.1 与.net 2.0的区别 。
It was bacause I had changed the Web.Config settings from
<xhtmlConformance mode="Legacy"/>to <xhtmlConformance mode="Transitional"/>.
I fixed it in 2 different ways. one was temporary fix by changing the control Ids that were hardcoded.Then I found another better solutions,i.e. to fetch elements from client ID. It was something like this document.getElementById('ctl00_DefaultContent_CtrlSurvey1_txtName').valueand I changed it to.
document.getElementById("<% =txtNameSelect.%>").valueand it worked for me.Hope it will help you too.
<xhtmlConformance mode="Legacy"/> 致ajax失效
Repeater item id has been changed from _ctl0_ to ctl00_