dotnet/aspnetcore

make Partial Tag Helper's "view-data" attribute helperful

Open

#9,736 opened on 2019年4月25日

GitHub で見る
 (7 comments) (8 reactions) (0 assignees)C# (10,653 forks)batch import
affected-fewarea-mvcbughelp wantedseverity-major

Repository metrics

Stars
 (37,933 stars)
PR merge metrics
 (平均マージ 16d 9h) (30d で 258 merged PRs)

説明

<partial name="view" view-data-additionalItem="abc" /> 

The IDictionary<string,object> has a very helpful way to add item , But this line of code throw exception because view-data is null .

I suggestion to either support this razor syntax or add a new attribute to add addiontal item to the partial view and not effect the current view‘s ViewData

コントリビューターガイド