skip to Main Content

Multiple Modelview for Blazor Server Page – Asp.net

I have a Blazor Page with one View, but I want to use two ViewModels for that, depends on which URL I use. @page "/canSimStatic" @page "/CanSimDynamic" @using System.Diagnostics; @using edge_cantraficSimulator.Data @using edge_cantraficSimulator.ViewModels @using System.Threading; @using System.IO; @using Microsoft.AspNetCore.Mvc.Rendering; @inject…

VIEW QUESTION

How to check if a context request path starts with a given string from a list of strings? – Asp.net

I have multiple if statements here which would check if a request path starts with a given string and return true if the condition is met if (context.Request.Path.StartsWithSegments("/abc/def", StringComparison.OrdinalIgnoreCase)) { return true; } if (context.Request.Path.StartsWithSegments("/pqr/xyz", StringComparison.OrdinalIgnoreCase)) { return true; }…

VIEW QUESTION

Pass API response to another action – Asp.net

I have one API endpoint for login. Once we enter correct username and password then we are getting following details : { "accessToken": "Some_Value", "accessTokenExpireAt": "Some_Value", "refreshToken": "Some_Value", "userID": "Some_Value" } Once user click on Submit button then below code…

VIEW QUESTION
Back To Top
Search