【问题标题】:Visual Studio Blazor: Encountered end tag "br" with no matching start tagVisual Studio Blazor:遇到没有匹配开始标记的结束标记“br”
【发布时间】:2020-12-24 17:43:29
【问题描述】:

我很熟悉不关闭标签的危险,但我的理解是<br />应该是自动关闭的?

@if (students != null) // Insert form
{
    <input placeholder="First Name" @bind="@firstName" /></br />
    <input placeholder="Last Name" @bind="@lastName" /></br />
    <input placeholder="School" @bind="@school" /></br />
    <button @onclick="@Insert" class="btn btn-warning">Insert</button>
}

导致错误RZ1026 Encountered end tag "br" with no matching start tag. Are your start/end tags properly balanced?

Visual Studio 2019 v16.7.2,dotnet core v3.1.401

非常感谢任何帮助。

【问题讨论】:

    标签: html .net-core blazor


    【解决方案1】:

    &lt;/br /&gt; - 两个斜杠。看起来 VisualStudio 正在尝试提供帮助。

    【讨论】:

    • 可能值得包含该标签的正确形式,以便人们想知道为什么它是错误的
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-25
    • 1970-01-01
    相关资源
    最近更新 更多