随笔分类 - Blazor
摘要:linq经常生成临时表,办法如下 1、得到单值 private List<string> FeeItems; 采用linq查询,例如 FeeItems = _context.表.Where(x => x.年 == CurrYear).OrderBy(s=>s.ItemId).Select(s =>
阅读全文
摘要:Blazor 遵循 ASP.NET Core 应用对于静态资产的约定。 静态资产位于项目的 web root (wwwroot) 文件夹中或是 wwwroot 文件夹下的文件夹中。 使用基相对路径 (/) 来引用静态资产的 Web 根。 在下面的示例中,logo.png 实际位于 {PROJECT
阅读全文
摘要:1、在服务器端安装dotnet-hosting-8.0.6-win,很关键 2、在iis创建网站,端口可选80或8080 应用程序池NET CLR选无托管代码,注意64位的则要将“启用32位程序”改为false 3、启动时可能有错,可通过服务器事件查看器查找原因 例如缺少 builder.Servi
阅读全文
摘要:根据blazor server 自动生成的例子 @page "/fetchdata" <PageTitle>Weather forecast</PageTitle> @using BlazorApp5.Data@inject WeatherForecastService ForecastServic
阅读全文
摘要:@using Microsoft.AspNetCore.Components.QuickGrid <PageTitle>Promotion Grid</PageTitle> <h1>Promotion Grid Example</h1> <QuickGrid Items="@people"> <Pr
阅读全文
摘要:法一: @using System.IO@inject IJSRuntime JS <PageTitle>File Download 1</PageTitle> <h1>File Download Example 1</h1> <button @onclick="DownloadFileFromSt
阅读全文
摘要:<h1>Event Handler Example 1</h1> <h2>@headingValue</h2> <p> <button @onclick="UpdateHeading"> Update heading </button></p> <p> <label> <input type="ch
阅读全文
摘要:<h1>Decimal Binding Example</h1> <p> <label> Decimal value (±0.000 format): <input @bind="DecimalValue" /> </label></p> <p> <code>decimalValue<
阅读全文
摘要:<PageTitle>Date Binding</PageTitle> <h1>Date Binding Example</h1> <p> <label> <code>yyyy-MM-dd</code> format: <input @bind="startDate" @bind:format="y
阅读全文