I use Identity Server in an Angular project (based on .NET Core) and when clicking Login button on our Angular page it redirects us to a login page that seems to belong to Identity Server on https://localhost:5001/Identity/Account/Login? url. I have look at many pages on Angular and View sides in my project, but there is not a page (razor or
Tag: asp.net-core
Is there any way to get full path of file in form?
I am trying to get file by input element of type “file”. That element is in partial view and I want to send it to controller or request it there by “Request.Form[“inputFile”];”. This way give me only name of the file. In the controller i want to send it via email attachment but I need to load that file. Aplication
SVG cannot be displayed as an image
I’ve got svg string file on database. I want to show it on my Asp.Net Core projects view. I’m calling my data as Model from controller. When I’m trying to do it, it displays as text on my page. Here is my svg: And here is my code on Index.cshtml file: How can fix this? UPDATE: Answer I’ve solved problem.
Sending Authorization Token Bearer through JQuery Ajax – Back end is .NET Core Web Api
I am having a 401 error code when I access to the api using Jquery Ajax. This is my front-end code: For my back-end, I am using ASP.NET Identity and my startup.cs code is I have tested. Without [Authorize] attribute, I can see the result response at the client side. But once I have added [Authorize] attribute and added headers
ASP .Net Core 3.1 octokit rest npm package issues
I use npm and a gulpfile.js to essentially export npm packages to a ‘lib’ folder under ‘wwwroot’; this works a treat and whenever I update a specific npm package if it’s in my gulpfile.js watch list it’ll push the contents to the ‘lib’ folder. The issue I have is that I used to use a manually extracted copy of ocktokit-rest
getting error while deleting record in the table – method not allowed “405 (Method Not Allowed)”
i want to delete record using ajax call but im getting error method not allowed. 405 error. code HTML JS c# code Answer I test my code,and I find HTTPDelete and HttpPost can work. Here is a demo for HTTPDelete: View: controller: Result: Here is a demo for HTTPPost: View: controller: Result:
Access Messages from Message Center
Hi I’m try to display the top 5 messages from the message center on the homepage. But I’m not sure what I’m doing wrong. I try to get the messages from the message view model here is my code. View model MessageViewModel.cs Controller Cshtml Answer To display top 5 records, we should use the “OrderByDescending()” to sort the message, and
How upload image in CKEditor 5 With asp.net core razor Pages
I Have A Razor Page Ineed this Page UPload image to server by CKEditor give me a sample Answer How upload image in CKEditor 5 With asp.net core razor Pages You can refer to the following example to achieve above requirement. JS code Page model class and handler Test Result
Changing an Input value in Blazor by javascript doesn’t change it’s binded property value
I’m building a website using app.net core 3.1 with blazor. In one of my components I have : <input @bind=”Message” type=”text” id=”input-message”/> Message is just a string property. and I have javascript: document.getElementById(‘input-message’).value = ‘some text’; The problem is after running the above js, <input> value changes but Message value doesn’t, and of course if I type or paste something
How to create chartjs chart with data from database C#
I am trying to create a chart.js graph in my .Net Core Web app, with data from the database. I am using ajax to call a method that will pull the data from the database, but I’m unsure how to group the data to display in the graph. At the moment I have a database that looks like so: I