我遇到一个问题,即.net核心输入标记帮助器似乎没有正确呈现。
<input id="FullName" type="text" class="standard-textbox" asp-for="Contact.FullName" data-validation-required="@Html.Raw(Contact.FullNameValidationErrorMessage.Trim())" placeholder="@Contact.FullNameLabel.Trim()" required />
这将呈现为:
<input id="FullName" type="text" class="standard-textbox" asp-for="Contact.FullName" data-validation-required="Please enter your name so we know who we're talking to." placeholder="Your full name" required="" aria-required="true" aria-describedby="FullName-error">
您将注意到asp-for helper未被重新呈现为“name”属性。
在另一个使用基本相同形式的网站上,输入字段正确呈现,并且asp-for被更改为名称。
答案 0 :(得分:3)
想出来!
Views / _ViewImports.cshtml 文件缺少以下行:
let earthAxisOfRotation = Vector3(0, 1, 0).normalized() // south -> north pole is `up` in world space
let surfaceNormal = position.normalized() // surface normal of the given position on sphere surface
let east = earthAxisOfRotation.cross(surfaceNormal).normalized()
let north = surfaceNormal.cross(east)
let rotationMatrix = Matrix4(
east.x, east.y, east.z, 0,
surfaceNormal.x, surfaceNormal.y, surfaceNormal.z, 0,
-north.x, -north.y, -north.z, 0,
0, 0, 0, 1
)
将此行添加到文件中可解决此问题。