Skip to content

view-data-* attribute for partial tag helper#60459

Closed
chekkan wants to merge 2 commits intodotnet:mainfrom
chekkan:partial-tag-helper-view-data
Closed

view-data-* attribute for partial tag helper#60459
chekkan wants to merge 2 commits intodotnet:mainfrom
chekkan:partial-tag-helper-view-data

Conversation

@chekkan
Copy link
Copy Markdown

@chekkan chekkan commented Feb 18, 2025

view-data-* attribute for partial tag helper

Support setting ViewData for <partial /> tag via view-data-* attributes.

Description

Similar to how the current <a> tag helper and its asp-route-* attribute is implemented.

Scoped to the Partial – Prevents conflicts with global ViewData.
Simple & Clean Syntax – No more manual ViewDataDictionary creation in views.

Have also added additional page to the HtmlGenerationWebsite for demonstration.

Fixes #9736

@chekkan chekkan requested a review from a team as a code owner February 18, 2025 08:36
@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Feb 18, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Feb 18, 2025
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 25, 2025
@chekkan
Copy link
Copy Markdown
Author

chekkan commented Feb 26, 2025

@dotnet-policy-service agree

@chekkan
Copy link
Copy Markdown
Author

chekkan commented Feb 26, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 60459 in repo dotnet/aspnetcore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates community-contribution Indicates that the PR has been added by a community member pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant