How to render page details using Javascript
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 m开发者_StackOverflow社区y 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.
The rendering of the control id's are different in .NET 3.5 and .NET 4.0. This would create problems.
Migration Issues
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" / >
Thanks i got the output. One small correction in your post.
c is small letter not caps. Even in msdn they have given the caps c. When i tried compiling in VS2010 i was able to found this.
精彩评论