✅ Retain form tag helper names inside partial view
I want to retain a form tag helper's name inside a partial view, I have a massive form model with lots of nested objects, below is just a simplified version of what I wanted to do
I have a form below, this works because Name.FirstName is being handled correctly by ASP automatically setting the name of the <input/> tag, my controller parses this correct into a Member object
// Main form .cshtml page view@model Member<form> <partial name="_NameSection"/></form>
// Main form .cshtml page view@model Member<form> <partial name="_NameSection"/></form>
and for some reason this breaks ASP's automatically set name for the <input/> tag, it just sets the input's name to FirstName when it should be Name.FirstName, how do I fix this?
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
C
C#
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.