我正在尝试使用Resharper的搜索模式/结构替换功能来查找(cs)html片段,如下所示,最终目标是用编辑器模板替换所述代码:
<div class="editor-label">
@Html.LabelFor(model => model.FirstName)
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.FirstName, new { @class = "text" })
@Html.ValidationMessageFor(model => model.FirstName)
</div>
我使用以下模式,但收到错误消息,说无法解析搜索模式:
@Html.LabelFor(model => model.$propertyName$)
<div class="editor-label">
@Html.LabelFor(model => model.$propertyName$)
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.$propertyName$, new { @class = "text" })
@Html.ValidationMessageFor(model => model.$propertyName$)
</div>
任何人都可以告诉我:
提前致谢
JP
答案 0 :(得分:1)
ReSharper 6.0不支持HTML中的SSR,但6.1会支持。 但仍然只有普通的HTML(在html,aspx,cshtml文件中),而不是Razor构造,比如@Html。 因此,即使在6.1中,您的模式也不会起作用。
P.S。是的,ReSharper能够处理多线模式。