我想知道HTML助手怎么样写@Html.TextBoxFor(model => model.signature)有data-id辅助性生产中的输入参数如下图所示.
<input type="text" name="signature" data-id="No Signature" />
Run Code Online (Sandbox Code Playgroud)
注1:参数之类dataId的工作是htmlAttributes因为它是一个简单的变量.
注2:我知道扩展方法和使用属性 @{var attributes = new Dictionary<string, object>{{ "data-id", "No Signature" }};}
我觉得必须有更好的方法来解决这个问题.任何的想法...?
非常感谢.