Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Feature: [EditorTemplates] Support htmlAttributes as IDictionary for dynamic scenarios [1687]

$
0
0
I can do this:

```csharp
@Html.EditorFor(m => m.Foo, new { htmlAttributes = new { @class = "form-control" } })
```

but I cannot do this:

```csharp
@Html.EditorFor(m => m.Foo, new { htmlAttributes = new Dictionary<string, object> { { "class", "form-control" } } })
```

Even though with the low-level helpers I can do both:

```csharp
@Html.TextBoxFor(m => m.Foo, new { @class = "form-control" })
@Html.TextBoxFor(m => m.Foo, new Dictionary<string, object> { { "class", "form-control" } })
```


Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>