Missing design view after editing Front-Code of Web User Control in ASP.NET

In this article, I am gonna to solve the below issue

The design view is out of sync with source view in Visual Studio.

Scenario

I have a web user control within a page in ASP.NET web application,

The design view is out of sync with source view in Visual Studio

I have tried to edit the Front-code, I got unexpected behavior! where the ASP.NET controls disappeared and the design view became out of sync.


Cause

It’s occasionally occurred if there’s an error in front code!

Solution

In my case, I make sure that there are no errors in the front code that have been reviewed carefully.

Note: If the User Control reference a CSS style-sheet you should also check it and ensure that it’s cleaned from error.

After a long investigation trip, I decided to move any CSS code to the bottom of the user control.

Missing design view after editing Front-Code of Web User Control in ASP.NET
After moving CSS codes and CSS files to the bottom of user control. I surprised where I can now edit Front-code without missing the design view.

The design view is out of sync with source view


Applies To
  • ASP.Net 3.5.
  • Visual Studio.
Advertisements

One thought on “Missing design view after editing Front-Code of Web User Control in ASP.NET

  1. Attractive section of content. I just stumbled upon your blog and
    in accession capital to assert that I acquire actually enjoyed account your blog posts.
    Anyway I will be subscribing to your augment and even I achievement you
    access consistently fast.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s