dotnet/aspnetcore

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

Open

#9 736 ouverte le 25 avr. 2019

Voir sur GitHub
 (7 commentaires) (8 réactions) (0 assignés)C# (10 653 forks)batch import
affected-fewarea-mvcbughelp wantedseverity-major

Métriques du dépôt

Stars
 (37 933 stars)
Métriques de merge PR
 (Merge moyen 16j 9h) (258 PRs mergées en 30 j)

Description

<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

Guide contributeur