In this article, we’re going to fix “The design view is out of sync with source view click here to synchronize views” that you may face when editing a user control in Visual Studio.
The design view is out of sync with Source view
In Visual Studio, I have a web user control within a page in ASP.NET web application as shown below:
When I tried to edit the Front-code, I got unexpected behavior! where the ASP.NET controls disappeared and I got the below warning message:
The design view is out of sync with source view click here to synchronize views
This issue usually occurs if there’s an error in the front code!
In my case, I checked and reviewed the front code carefully, and made sure that there are no errors in the front code!
After a long investigation trip, I decided to move any CSS code to the bottom of the user control. After moving CSS codes and CSS files to the bottom of user control. the design view is synchronized automatically and I can edit Front-code without missing the design view.
Note: If the User Control reference a CSS style-sheet you should also check it and ensure that it’s cleaned from error.
In conclusion, we have learned to fix this error “The design view is out of sync with Source view”, we should make sure that there is no errors in the front code like missing closed tag ..etc. also we should make sure that all linked CSS and JS files have no errors.
- ASP.Net 3.5.
- Visual Studio.