volume_up
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Since this looks like a nested class, try doing nameof @Html.TextBox(nameof(Model.Test.Example), new { @class = "form-control"})
I tried but getting the same result ->
@Html.TextBox(nameof(Model.Test.Example), Model.Test.Example, new {@class="form-control"})
The second paramter is to set initial value :)
I found a solution. By adding below line on top of razor view file, the html field prefix is removed
@{
ViewContext.ViewData.TemplateInfo.HtmlFieldPrefix = string.Empty;
}
Hi,
I want to display form via block (viewcomponent), but the form is generating textbox with contentarea & currentpage name.
e.g ->
Generates ->
TestContentArea is contentarea where block is added
How to generate name which only contains viewmodel field name like Test.Example ?