Geeks With Blogs
hmloo's World of .NET

We always have a problem that Designer.cs not updating automatically when we add new controls in markup or the designer, and if we want to get it in code behind, it doesn’t show up. I have met this problem  when I add a usercontrol in aspx file. So I change source view to design view and switch back and forth, even I reopen my solution and rebuild, it still cannot be found. At last, I find a easy way to solve it :

1. Close designer.cs.

2. Change your aspx file to design view.

3. Right-Click –> Refresh.

4. Save

You will see all controls in designer.cs file. Hope to help you!

Posted on Wednesday, February 15, 2012 2:55 AM Developer Tools | Back to top


Comments on this post: Easy way to force designer.cs to update

# C0RRIN0@aim.com
Requesting Gravatar...
I have the same problem, but this solution doesn't work for me. Sorry.
Left by Pim on May 03, 2013 8:10 PM

# re: Easy way to force designer.cs to update
Requesting Gravatar...
It works!!!
Left by Sue on Sep 24, 2013 3:25 AM

# re: Easy way to force designer.cs to update
Requesting Gravatar...
It doesn't work in VS 2012 Professional :(
Left by Dukhabandhu Sahoo on Mar 25, 2014 7:44 PM

# re: Easy way to force designer.cs to update
Requesting Gravatar...
Thanks a lot it works like a charm... In vs 2013
Left by sreedhat on Feb 11, 2016 8:53 PM

Your comment:
 (will show your gravatar)


Copyright © hmloo | Powered by: GeeksWithBlogs.net