摘要: 根据blazor server 自动生成的例子 @page "/fetchdata" <PageTitle>Weather forecast</PageTitle> @using BlazorApp5.Data@inject WeatherForecastService ForecastServic 阅读全文
posted @ 2024-03-29 16:44 Biyuanguang 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 采用javascript访问服务器上的文件,文件存在则打开文件,不存在返回不存在 控制器: [HttpPost]public ActionResult CheckFileExists(string aFile){ // 检查文件是否存在 string filePath = Server.MapPat 阅读全文
posted @ 2024-03-26 12:23 Biyuanguang 阅读(1) 评论(0) 推荐(0) 编辑
摘要: @using Microsoft.AspNetCore.Components.QuickGrid <PageTitle>Promotion Grid</PageTitle> <h1>Promotion Grid Example</h1> <QuickGrid Items="@people"> <Pr 阅读全文
posted @ 2024-03-03 10:46 Biyuanguang 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 法一: @using System.IO@inject IJSRuntime JS <PageTitle>File Download 1</PageTitle> <h1>File Download Example 1</h1> <button @onclick="DownloadFileFromSt 阅读全文
posted @ 2024-03-03 10:32 Biyuanguang 阅读(21) 评论(0) 推荐(0) 编辑
摘要: <h1>Event Handler Example 1</h1> <h2>@headingValue</h2> <p> <button @onclick="UpdateHeading"> Update heading </button></p> <p> <label> <input type="ch 阅读全文
posted @ 2024-03-03 10:29 Biyuanguang 阅读(16) 评论(0) 推荐(0) 编辑
摘要: <h1>Decimal Binding Example</h1> <p> <label> Decimal value (&plusmn;0.000 format): <input @bind="DecimalValue" /> </label></p> <p> <code>decimalValue< 阅读全文
posted @ 2024-03-03 10:22 Biyuanguang 阅读(5) 评论(0) 推荐(0) 编辑
摘要: <PageTitle>Date Binding</PageTitle> <h1>Date Binding Example</h1> <p> <label> <code>yyyy-MM-dd</code> format: <input @bind="startDate" @bind:format="y 阅读全文
posted @ 2024-03-03 10:21 Biyuanguang 阅读(7) 评论(0) 推荐(0) 编辑
摘要: <PageTitle>Conditional Attribute</PageTitle> <h1>Conditional Attribute Example</h1> <label> <input type="checkbox" checked="@IsCompleted" /> Is Comple 阅读全文
posted @ 2024-03-03 10:19 Biyuanguang 阅读(10) 评论(0) 推荐(0) 编辑
摘要: @page "/" <div> <p>Output: @message</p> <button onclick="document.getElementById('my-dialog').showModal()"> Show modal dialog </button> <dialog id="my 阅读全文
posted @ 2024-03-03 10:12 Biyuanguang 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 一、Input事件: <h1>Bind Event Example</h1> <p> <label> InputValue: <input @bind="InputValue" @bind:event="oninput" /> </label> </p> <p> <code>InputValue</ 阅读全文
posted @ 2024-03-03 09:45 Biyuanguang 阅读(8) 评论(0) 推荐(0) 编辑