0

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 2

1

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" / >
Sign up to request clarification or add additional context in comments.

1 Comment

Yes i tried adding the CLientIDMode but i got an error in the eventviewer saying "Unrecognized attribute 'ClientIDMode'." in web.config
1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.