-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
Description
Is your feature request related to a problem? Please describe.
I was hoping the "Test.razor.cs" file below (with no corresponding "Test.razor" file hence no "partial" ) would actually work as a Page for example. But I get the "Sorry, there's nothing at this address." error when going to ".../Test"
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering;
using NorthWind.UI.Shared;
namespace NorthWind.UI.Pages
{
public class Test : ComponentBase
{
protected override void BuildRenderTree(RenderTreeBuilder builder)
{
builder.OpenComponent(0, typeof(SurveyPrompt));
builder.AddAttribute(1, "Title", $"Some Test");
builder.CloseComponent();
base.BuildRenderTree(builder);
}
}
}
Describe the solution you'd like
A way to add code only Blazor pages on Startup to Page routes that evaluate, either automatically or via an extension method.
Metadata
Metadata
Assignees
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components