开发者

Some aspx controls are not recognized in the code-behind files

开发者 https://www.devze.com 2023-01-08 03:11 出处:网络
I noticed that some aspx controls were not being recognized by intellisense, and when I tried to compile, I got errors sta开发者_Python百科ting that the controls basically didn\'t exist.

I noticed that some aspx controls were not being recognized by intellisense, and when I tried to compile, I got errors sta开发者_Python百科ting that the controls basically didn't exist.

After a lot of tinkering, I realized that the .aspx.designer.cs file was missing for several .aspx files.

What is the best way to re-create the files?


  1. Delete the aspx.designer.cs file
  2. Right click on the aspx file and select "Convert to Web Application"

If the aspx.designer.cs file is already gone just do step 2. If it's there but you are getting the error you described do both steps.

It's a total pain, hoping MS will get this one ironed out. In my experience this occasionally happens if you make changes in the aspx file while you are running the application, so you might try to avoid that...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号