0

Recently in one of my web project I renamed an aspx file (Say oldname.aspx) to different one (newname.aspx). But after the renaming all the control references in my code triggers error

the name does not exist in the current context.

But I renamed the classes as well and I searched for there is any existence of that old name anywhere in the project. But it shows none.

But still why it triggers that error. I was not just renaming. I was refactoring.

Vijunav Vastivch
  • 4,153
  • 1
  • 16
  • 30
Sandeep Thomas
  • 4,303
  • 14
  • 61
  • 132
  • 1
    there are multiple files associated with the filname like .designer.cs you should rename the class first using quick refactoring so that it changes everywhere it'being referred and also rename all associated files – Ehsan Sajjad Jan 23 '19 at 07:56
  • 1
    The ASPX page has both designer and code-behind files. Try refactoring the namespace of those files according to current file name. – Tetsuya Yamamoto Jan 23 '19 at 07:58
  • Possible duplicate of [The name 'controlname' does not exist in the current context](https://stackoverflow.com/questions/706603/the-name-controlname-does-not-exist-in-the-current-context) – Vijunav Vastivch Jan 23 '19 at 08:02
  • @TetsuyaYamamoto I tried that.. even its the same error.. :( stressed – Sandeep Thomas Jan 23 '19 at 08:28

0 Answers0