@page "/"
@result
<button onclick="@TestClick">Click me</button>
@functions {
string result {get;set;}
void TestClick()
{
result = DateTime.Now.ToString();
}
}
namespace BlazorFiddleProject
{
using Microsoft.AspNetCore.Blazor.Builder;
using Microsoft.Extensions.DependencyInjection;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
}
public void Configure(IBlazorApplicationBuilder app)
{
app.AddComponent<App>("app");
}
}
}