3
我建立一个形式剃刀象下面这样:Html.BeginRouteForm接受-charset属性
@using (Html.BeginRouteForm("foo", new { controller = "foo", action = "bar" }, FormMethod.Post, new { id="foo", enctype="multipart/form-data", accept-charset="utf-8" }))
{
<label for="file">File</label>
<input type="file" name="file" id="file" />
<input type="submit" value="Send"/>
}
我需要在表单标签的一些属性。但编译器不喜欢accept-charset中的破折号。我如何允许C#中的对象属性有一个破折号?