如何允许 Visual Studio 在 html 编辑器中验证 {$Something}?

发布于 2024-12-20 01:11:05 字数 614 浏览 3 评论 0原文

在 Visual Studio HTML 编辑器(aspx webform / mvc)中,我有一些代码:

<tr id="${PropertyKey}">
  <td title="DataModeHtml">
     <input type="checkbox" ${DataModeHtml} value="${DataModeKey}"/>
  </td>
  <td title="PropertyCode">
    ${PropertyCode}
  </td>
</tr>

我使用 jTemplates 将 ${DataModeHtml} 渲染为 [checked='checked'][字符串.空]。 一切正常,但编辑器错误列表中的 Visual Studio“警告”:“验证(XHTML 1.0 Transitional):属性“DataModeHtml”不是元素“input”的有效属性。”

我们如何:在 Visual Studio 中进行设置、创建附加组件或向 xsd-xml IntelliSense VS 添加某些内容来解决此问题?

In Visual Studio HTML Editor (aspx webform / mvc) i have some code:

<tr id="${PropertyKey}">
  <td title="DataModeHtml">
     <input type="checkbox" ${DataModeHtml} value="${DataModeKey}"/>
  </td>
  <td title="PropertyCode">
    ${PropertyCode}
  </td>
</tr>

I use jTemplates to render ${DataModeHtml} to [checked='checked'] or [string.Empty].
All okie, but Visual Studio "Warning" in editor Error List: "Validation (XHTML 1.0 Transitional): Attribute 'DataModeHtml' is not a valid attribute of element 'input'."

How can we: setting in visual studio, create add-on or add something to xsd-xml IntelliSense VS to solving this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乖乖 2024-12-27 01:11:05

需要在 Intellisense 文件中声明自定义标签。

请参阅MSDN 中的这篇文章,然后向下滚动到自定义 IntelliSense标签

Need to declare custom tags in the Intellisense files.

See this article from MSDN and scroll down to IntelliSense for custom tags

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文