Skip to content

Blazor - Inject script via C# during build #11325

Closed
@VR-Architect

Description

@VR-Architect

Please consider adding a feature where we can use C# in a razor page to inject javascript code when the user is on the page, then it removes the javascript code when they leave the page. Ideally, this inject would create the required code to handle this during the build.

Currently, I am putting all of my custom javascript on the index.html page so it can get quite long and I lose track of why a method was added in support of some razor page. I am using the Blazor ASP Hosted framework.

Thanks

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing one

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions