Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

website migration from target framework 3.5 to 4.5

I need to migrate my website which was earlier in target framework 3.5. Now i need to convert it into 4.5, Please tell me that best approach to do it.....

I have tried with visual studio 2012 'Build' option to change it to 4.5. But i am getting lots of script resource error mainly in js file, although these all works fine in 3.5. After changing it to 4.5 , I m getting so many java script errors. So, i am missing something. Need to discuss these errors with you, so currently i am not including any error with you.

Please help me for the the right approach for this.

Any kind of help will be highly appreciated. Thanks in advance.

like image 497
Vinay Sinha Avatar asked Aug 09 '26 07:08

Vinay Sinha


1 Answers

You may have problems with some of the HTML elements you have marked as runat="server", specially iFrames.

So, if you a line of code (in you code-in-front) that looks like

<iframe id="myServerSideIframe" runat="server" src=""></iframe>

you are going to have problems loading them. The reason is that the type of the corresponding variable in your code-behind for most of the HTML elements is "System.Web.UI.HtmlControls.HtmlGenericControl". However, in .Net 4.5, there are specific types for each HTML element, e.g. System.Web.UI.HtmlControls.HtmlIframe.

In order to resolve this, one easy way is changing the Id of that element in code-in-front, and changing it back to the original Id. That way, the designer will automatically update the variable declarations in the designer file.

like image 156
Sadra Abedinzadeh Avatar answered Aug 11 '26 22:08

Sadra Abedinzadeh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!