以前的项目一直使用2.0 升级4.0后 发现缘由的document.form1 取不到值了,
检查发现form没有自动生成name属性
这是因为Web.config中<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
只需要改掉把AutoID改为 Static 就可以正常了!
以前的项目一直使用2.0 升级4.0后 发现缘由的document.form1 取不到值了,
检查发现form没有自动生成name属性
这是因为Web.config中<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
只需要改掉把AutoID改为 Static 就可以正常了!