What causes the ASP.NET Err开发者_如何学运维or CS0103? I get that error saying that Label01
can not be found in the current context` when I try to compile the project.
What is causing it?
Make sure you have a control with that name in the page, and that it is included in the .designer
file. If not, then add it or remove it as needed.
The designer sometimes gets out of sync with the page's markup. Alternatively, right-click on the page that's causing the error and select 'Convert to Web Application' to force a sync.
Also try the following fix,
Delete the .vs directory beside your solution, as it might have invalid data cached.
Source
精彩评论