News Articles .net-core

API doesn’t detecting model in PUT request in axios put

I’m using core with vuejs and axios. I’m trying to hit my put API but its not passing the object model. Rest of the functions are working fine but only put is not catching the object. please focus on function updatestokes only var app = new Vue({ el: ‘#app’, data: { newStock: { productId: […]

publish jquery front-end project

I was used adminlte admin template for my admin panel project. adminlte developed by jquery, javascript, and bootstrap. I developed a project with separate front and back-end layers, which means my front-end project is just jquery and javascript and backend is .net core. know, when I want to publish the front-end layer, I just do […]

Avoid Razor pages reload on js fetch call

I use button click event to trigger a js fetch that call my razor page method. On the page I have several elements rendered with PageModel property values @(Model.MyValue) for example. My problem is that every time I do my fetch call, the page is re-rendered and my values are null if I don’t reload […]

VS 29019 ASP.Net Core + React Template — Why doesn’t the NavToggler work?

Steps to recreate the issue: Open Visual Studio 2019 Select to Create a New Project… Select the ASP.Net Core Application with React and Redux, and save it wherever. Hit F5 to build and run. The fresh application works just fine, however, if you open up the ..ClientAppsrccomponentsNavMenu.tsx file, you will see that there is a […]

Capturing manually entered date before jquery datapicker resets to current date while restricting with Maxdate

I have a datapicker class (datepicker_nfd) that is attached to an input field that uses maxdate to limit the date widget to only current dates. I have a custom knockoutjs binding to display a custom error message and reset the date when the users leaves the field (onchange). My problem is if a user manually […]

Promises.all has null values when too many post requests sent

I am making a bunch of post requests to my API that will return some html/invoices, there are two scenerios where all the responses seem to be correct. When I send a small amount of requests. When I send a bunch requests, but the posted data is small in each one However, when I post […]

Client side AJAX vs Server side AJAX [closed]

When is it better to use client side AJAX (e.g. through JavaScript) and when is it better to use server side AJAX? I realize that the two aren’t 1-to-1 comparable, with client side AJAXes being used for dynamic content loading and server side used for "on page request" content loading. But, can someone inform me […]

SelectPDF .net core free edition: CSS issue in final pdf

I have an issue while using Select.HtmlToPdf.NetCore v 21.1.0. please refer screenshot below which contains various view of final HTML content in different browsers or visualizers and final PDF output of same HTML HTML visualizer view in runtime VS 2019 of final html before pdf HTML visualizer Same HTML copies separately to view first in […]

dotnet core – Multiple SPAs – redirect from one SPA to another SPA, NextJS and React

I have two apps, one React app and one NextJS app. The React app is running on localhost:5001, and the NextJS app is running on localhost:3000. When I start the app, it spins up fine and starts my browser on localhost:5001 loading my react app. I have some middleware set up so that if the […]

"dotnet new react" wont let me use sass files

I tried to make a asp.core with a react frontend. so I run the "dotnet new react -o " command. This created a project that was runnable. The problem was that it couldn’t run sass files. So I tried to install the node-sass with the "npm install node-sass" on the client folder containing the node-modules […]

Query string sending only half URL to controller

I have a URL that I am trying to pass as a query string to the controller. But When I do that, I get only half URL. However, console.log prints the whole URL. export async function sendNotification(PlanId: string, URL: string) { console.log(“Service URL : – “, URL); let url = HttpClient.buildUrl(`api/smsNotification/${PlanId}?URL=${URL}`); return await HttpClient.get(url); } […]

Effective Debugging with .NET

Most of the projects I work with today have external dependencies of some sort. This could be a database, a cloud provider, or just… Continue reading on Level Up Coding » Source: Level Up Coding

Net Core Webapi/SignalR app blocked by CORS policy (netcore 5 with net framework 4.7.2. FE consumer)

I have a net framework 4.7.2 FE which I would like to consume a new netcore 5 webapi/signalR application. At the moment I have both running on my machine with the FE in VS2017 under local IIS ( and latter in VS2019 IIS Express and both are span up with the play/debug button. I have […]

.net core 3.1 web.config with routing

I tried publish my project on hosting, but I have some issues. I have SPA (react) in same folder as .netCore(rest api). I want SPA routing, thats why I set rule in web.config, but it is not working. When I remove handlers ("aspNetCore") section from config, it is works, but restApi doesnt. Can anyone help […]

Remove Element from JavaScript array in .NET core Razor

I have input when the user click on add button it should add a new li in the ul list and add a new object in array "Keywords" to send it to the action, but the problem is when the user removes an element from the ul list I remove the index of the element […]

Prevent automatically opening excel file after click on download button react js

I am using dot net core with react app to generate excel files and download the same with EPPLus library and code below. API: [HttpGet("download-loads/{projectNumber}/{simulationId}")] public ActionResult DownloadHVACLoadsData( [FromServices] IDbContextFactory<APIDbContext> serviceScopeFactory, string projectNumber, Guid simulationId) { using APIDbContext dbContext = serviceScopeFactory.CreateDbContext(); var hvacLoadsData = dbContext.HvacLoadReports .Where(s => s.ProjectNumber == projectNumber && s.DesignHubProjectLoadSimulationId == simulationId).ToList(); var […]

Selecting ,Dragging and dropping text in the SummorNote throws ‘Uncaught TypeError: Cannot read properties of null (reading ‘insertBefore’)’ Exception

I am using SummerNote version "0.8.18". My Website is based on Blazor Server .net 5. This issue is that when I type some text in a summernote and select some part of the text and drag and drop at the corner of the same summer note it throws the expection ‘Uncaught TypeError: Cannot read properties […]

When I call partial view using ajax it doesn’t render properly

I am trying to nest multiple elements inside a Div using Ajax. When the button is triggered, the Ajax method is called and the following action is taken: $("#kdCardButton").click(function () { $.ajax({ url: ‘/MyController/[email protected]&cardId=’ + 1+ ‘&cardType=kd’, success: function (partialView) { $(‘#divCardType1’).append(partialView); } }); }); Although this process brings the html to my page, it […]

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.