以下のようにRazorでフォームを作成しています:
@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"/>
}
form タグでいくつかの属性を取得する必要があります。しかし、コンパイラは、accept-charset のダッシュを好みません。C# のオブジェクト プロパティにダッシュを含めるにはどうすればよいですか?