I am converting my existing application from .NET 3.5 to .NET 4. in that process instead of compiling in VS2010 i just changed the IIS config of my application point to 4.0 framework. Now the issue is we are using Javascript to render the page details as Objects. example we have page name Search.aspx so we use document.Search.textbox1.value to get the text box value. Here Search acts a object which contains all the items. But when i run in 4.0 Framework i getting error in the document.Search saying it is undefined. Can anyone tell me is there any big change between 3.5 and 4.0 framework. Because when i run the same application in 3.5 it works fine. Pls suggest some inputs.
2 Answers
The rendering of the control id's are different in .NET 3.5 and .NET 4.0. This would create problems.
If you use Visual Studio 2010 to upgrade your application from ASP.NET 2.0 or ASP.NET 3.5, the tool automatically adds a setting to the Web.config file that preserves the behavior of earlier versions of the .NET Framework. However, if you upgrade an application by changing the application pool in IIS to target the .NET Framework 4, ASP.NET uses the new mode by default. To disable the new client ID mode, add the following setting to the Web.config file:
<pages ClientIDMode="AutoID" / >
1 Comment
Krishn
Yes i tried adding the CLientIDMode but i got an error in the eventviewer saying "Unrecognized attribute 'ClientIDMode'." in web.config