Client ID change in run time with diffrent framwork version in Asp .Net


when we convert web-application to version 2.0 to 4.0 at that time we need to change the line in web.config file like

<compilation debug=”true” targetFramework=”4.0″>

Because if our application with version 4.0 in IIS and your web.config file value is <compilation debug=”true” targetFramework=”2.0″>

Then client Id gives different in run time in and getting problem in java script functions.


For example I have used <asp:RadioButton id=”rbndisplay”  runat=”server”></asp:RadioButton>


then you are using code behing file to get this control like   rbndisplay.ClientID  then your javascript function use like


then if you haven’t changes the line <compilation debug=”true” targetFramework=”2.0″> in web.config file and your version 4.0 in IIS then you will get problem on java script line and through the error like null value.