Basic refactoring features (e.g., Rename) unavailable when editing code in an aspx/ascx files

Posted by DanM on Stack Overflow See other posts from Stack Overflow or by DanM
Published on 2010-03-13T23:50:09Z Indexed on 2010/03/13 23:55 UTC
Read the original article Hit count: 336

Filed under:
|
|
|

I was just editing some C# code between <% %> tags in an .ascx file, and I noticed that the Refactor contextual menu is unavailable. And even if I manually add items from this menu to a custom toolbar, they are disabled when viewing aspx/ascx files.

I usually only have small snippets of C# code in my aspx/ascx files, but it would still be nice to be able to perform refactoring operations on any code that exists between <% %> tags. I feel like I'm going back to the dark ages when I have to use find/replace to change the name of a variable.

Questions

Is there a way to enable Visual Studio's refactoring features while viewing aspx/ascx files in Visual Studio?

Are there any Visual Studio plug-ins (preferably free) that offer this kind of functionality?

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about c#