gpt4 book ai didi

asp.net-core - 为什么我收到错误 : The tag helper 'body' must not have C# in the element's attribute declaration area

转载 作者:行者123 更新时间:2023-12-02 10:56:38 26 4
gpt4 key购买 nike

我已经改变了我的 _Layout.cshtml 文件中的纯常用 body 元素

<body data-my-attibute='myattributevalue'>


<body  @myAttributes>

并收到错误消息:

Severity Code Description Project File Line Suppression State Error RZ1031 The tag helper 'body' must not have C# in the element's attribute declaration area.



body 元素的外观和行为不像标签助手
简而言之:H E L P,这是星期五下午我背上的一把刀......

最佳答案

我遇到了类似的问题,我从文档中了解到,您可以通过添加 ! 来禁用单个标签上的标签助手,因此您的代码将是:

<!body  @myAttributes>
</!body>

关于asp.net-core - 为什么我收到错误 : The tag helper 'body' must not have C# in the element's attribute declaration area,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61822914/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com