查找 ASP.NET 项目中所有未关联的标签
Finding all unassociated labels in the ASP.NET project
我正在执行第 508 条 upgrade/conversion/whatever,有一个简单的 TODO 列表可以加快我的速度。一个大问题是我们有 标签但没有设置 AssociatedControlID=""
属性。如何在我的解决方案中轻松找到所有这些标签?
我正在使用 Visual Studio 2012 和 ReSharper(自定义模式有帮助吗?)。
是的,自定义模式应该能够为您找到那些。使用 ReSharper → Find → Search with Pattern,并将模式设置为:
<asp:label $attributes$ />
其中 $attributes$
占位符是 "attribute placeholder",选项 "Name should NOT match the regex" 设置为类似 \bAssociatedControlID\b
的内容。
我正在执行第 508 条 upgrade/conversion/whatever,有一个简单的 TODO 列表可以加快我的速度。一个大问题是我们有 AssociatedControlID=""
属性。如何在我的解决方案中轻松找到所有这些标签?
我正在使用 Visual Studio 2012 和 ReSharper(自定义模式有帮助吗?)。
是的,自定义模式应该能够为您找到那些。使用 ReSharper → Find → Search with Pattern,并将模式设置为:
<asp:label $attributes$ />
其中 $attributes$
占位符是 "attribute placeholder",选项 "Name should NOT match the regex" 设置为类似 \bAssociatedControlID\b
的内容。