Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chekkan
Copy link

@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
@dotnet-issue-labeler dotnet-issue-labeler bot 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
Copy link
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@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
Author

chekkan commented Feb 26, 2025

@dotnet-policy-service agree

@chekkan
Copy link
Author

chekkan commented Feb 26, 2025

/azp run

Copy link

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