Rob, actually there is a much simpler way. Instead of name, use Name:
@Html.TextBoxFor(x => x.Data, new { Name = Model.Key + "_Data", id = Model.Key + "_Data" })
More Related Contents:
- Razor: Declarative HTML helpers
- ASP.NET MVC DropDownListFor with model of type List
- MVC3 Razor DropDownListFor Enums
- MVC Razor view nested foreach’s model
- How to render a Razor View to a string in ASP.NET MVC 3?
- asp.net-mvc: razor ‘@’ symbol in js file
- How do I define a method in Razor?
- I want to understand the lambda expression in @Html.DisplayFor(modelItem => item.FirstName)
- Complex models and partial views – model binding issue in ASP.NET MVC 3
- Possible to access MVC ViewBag object from Javascript file?
- Conditionally change CSS class in Razor view
- How to declare a local variable in Razor?
- MVC 3: How to render a view without its layout page when loaded via ajax?
- Better way to get active page link in MVC 3 Razor
- How do I get the Controller and Action names from the Referrer Uri?
- MVC HTML Helpers and Lambda Expressions
- How to retain spaces in DropDownList – ASP.net MVC Razor views
- on select change event – Html.DropDownListFor
- razor view with anonymous type model class. It is possible?
- How to edit multiple models in a single Razor View
- Conditional html attribute with Html Helper
- Uploading image in ASP.NET MVC
- How to use multiple form elements in ASP.NET MVC
- asp.net MVC3 razor: display actionlink based on user role
- Render Razor View to string in ASP.NET Core
- Using Razor outside of MVC in .NET Core
- What happens in BeginProcessRequest()?
- Multiple fields validation using Remote Validation
- How to upload files using ajax to asp.net mvc controller action
- Using Razor without MVC [duplicate]