我遵循了本在线教程,因为我想在联系表格中添加recaptcha,并决定尝试一下。
https://elliottbrand.com/blog/1/creating-a-contact-form-in-aspnet-core-31-mvc-using-google-recaptcha-and-blazor
我遵循所有指令而且我为正在开发的网站所做的大多数功能都可以在视图中显示 ContactComponent
。我在ASP.NET Core应用程序中使用默认导航。
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Controller" asp-action="Component">Contact</a>
</li>
我的问题是联系视图不会在本地呈现 ContactComponent
。
我是否需要将联系人组件注入联系人视图,还是只是一个链接问题。
只是回到我的发展事业,所以我很抱歉听起来很愚蠢,因为我觉得这只是一个链接问题。非常感谢!
I followed this online tutorial as I wanted to add ReCaptcha to my contact form and decided to give this a go.
https://elliottbrand.com/blog/1/Creating-a-Contact-Form-in-AspNet-Core-31-MVC-Using-Google-reCAPTCHA-and-Blazor
I followed all the instructions and I have most of the functionality done for the website I am developing, however I am stuck getting the ContactComponent
to show in the view. I am using the default navigation in an ASP.NET Core application.
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Controller" asp-action="Component">Contact</a>
</li>
My problem is that the Contact View will not render the ContactComponent
locally.
Do I need to inject the Contact Component into the contact View or is it just a linking issue.
Just getting back into my development career so I am sorry if sounds silly as I feel its just a link issue. Many thanks!
发布评论
评论(1)
尝试使用组件标记助手在cshtml视图中渲染闪电组件。
阅读 prerender并集成了asp.net核心剃须刀组件以了解更多信息。
Try to use the component tag helper to render Blazor components in cshtml views.
Read Prerender and integrate ASP.NET Core Razor components to know more.