开发者

How to set-up ReSharper so that it jumps to .aspx but not to .Designer.cs on F12 hit?

开发者 https://www.devze.com 2023-04-13 03:25 出处:网络
Is there a way to set-up RESharper so that when I am on code-behind and when my cursor is on an aspx element if I hit F12 (Go to decleration) it开发者_如何学运维 jumps to aspx markup page but not to D

Is there a way to set-up RESharper so that when I am on code-behind and when my cursor is on an aspx element if I hit F12 (Go to decleration) it开发者_如何学运维 jumps to aspx markup page but not to Designer.cs page?


Formally, any aspx element is declared in a designer file, which is why when you choose to go to declaration from code-behind, you end up landing in the designer file.

This is a usability issue and ReSharper probably should offer a disambiguation pop-up on "Go to Declaration" in this context. However, it currently doesn't do that. I have submitted a feature request that you can watch and/or vote for.

I can suggest two workarounds:

  • Use "Go to Usages of Symbol" (ReSharper > Navigate > Usages of Symbol) that provides a pop-up window with usages that you can quickly choose from.
  • Use "Go to File Member" (ReSharper > Navigate > Go to File Member) where you can type in a part of the name of the item, and ReSharper will show you matching declarations found in related files. For a code-behind file, related files always include both markup and designer file.


Use Shift+Ctrl+Alt+G, then just select underlying .aspx or .ascx file

0

精彩评论

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

关注公众号