dotnet/aspnetcore

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

Open

#9736 aperta il 25 apr 2019

Vedi su GitHub
 (7 commenti) (8 reazioni) (0 assegnatari)C# (10.653 fork)batch import
affected-fewarea-mvcbughelp wantedseverity-major

Metriche repository

Star
 (37.933 star)
Metriche merge PR
 (Merge medio 16g 9h) (258 PR mergiate in 30 g)

Descrizione

<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

Guida contributor