如何在 Visual Studio 中查找使用母版页的所有页面
有没有办法在 Visual Studio 中查找实现特定母版页的所有网页?
我正在寻找像 Shift F12 这样的快捷方式,可以找到母版页的所有用法。 当我在母版页类名称上执行此操作时,它只会将我带到设计视图,而不是显示使用它的所有页面。
我有 Resharper,如果里面有什么可以帮助的话。
我知道我可以使用“查找”对话框,但这不太好。
Is there a way to find all web pages that implement a specific master page in Visual Studio?
I'm looking for a shortcut like shift F12 that will find all usages of a master page. When I do it on the master page class name it only takes me to the design view instead of showing all pages that use it.
I do have Resharper if there is something in there that will help.
I know that I can use the Find dialog but that is not as nice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您提到 FindDialog 不太好...如果我只是使用“查找下一个”对话框,我会同意。 但是“查找全部”将显示所有页面的列表,然后您可以双击列表中的每个项目(因为它保持打开状态)。
Control + Shift + F(或用双筒望远镜按文件夹图标)。
You mention that the FindDialog isn't that good... and I would agree if I'm was just using the Find Next dialog. But the "Find All" will display a list of all of the pages, then you can double click on each item in the list (as it stays open).
Control + Shift + F (or press the folder icon with the binoculars).
您现在在 ReSharper 5.0 中拥有此功能。
You have this functionality now in ReSharper 5.0.
这非常很难做到。 您可以在 aspx 文件、web.config 或 Page_PreInit 事件中设置母版页,这使得无法准确知道将使用哪个母版页。
您认为这里使用了什么 MasterPage?
正如您所看到的,无法确定真正使用了哪个母版页。
That would be very hard to do. You can set master pages in the aspx-files, web.config or in the Page_PreInit event, which make it impossible to know exactly which master page is going to be used.
What MasterPage to you think is used here?
As you can see, there is no way to be sure which master page is really used.