+ Request ID: @RequestId
+
+ Swapping to Development environment will display more detailed information about the error that occurred. +
++ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +
+ +@code{ + [CascadingParameter] + private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; +} diff --git a/CS/BlazorApp_SpreadsheetDocumentAPI/Pages/Index.razor b/CS/BlazorAppSpreadsheet/Components/Pages/Home.razor similarity index 87% rename from CS/BlazorApp_SpreadsheetDocumentAPI/Pages/Index.razor rename to CS/BlazorAppSpreadsheet/Components/Pages/Home.razor index 72711cd..7c144db 100644 --- a/CS/BlazorApp_SpreadsheetDocumentAPI/Pages/Index.razor +++ b/CS/BlazorAppSpreadsheet/Components/Pages/Home.razor @@ -1,4 +1,7 @@ @page "/" +@rendermode InteractiveServer +@using System.Globalization +@using Microsoft.AspNetCore.WebUtilities @inject DocumentService DocumentService @inject IJSRuntime JS @@ -8,10 +11,11 @@- This example uses the - Spreadsheet Document API - to create a loan amortization schedule. Specify the loan amount, loan period in years, - annual interest rate, and start date to calculate your loan payments. Click Export to XLSX + This example uses the Spreadsheet Document API + to create a loan amortization schedule. + Specify the loan amount, loan period in years, + annual interest rate, and start date to calculate + your loan payments. Click Export to XLSX or Export to PDF to save the result as XLSX or PDF.
@@ -66,14 +70,14 @@