All Questions
Tagged with asp.net-core-mvc .net-6.0
186
questions
0
votes
1
answer
45
views
How to populate CreateGroupViewModel
I'm having trouble with inputting value into a ViewModel as it keep returning null after the value is inputted via cshtml.
Value I input in cshtml
After hitting confirm
CreateViewModel.cs
public ...
1
vote
1
answer
60
views
Is it possible to use ProtectedLocalStorage without regular .NET Core?
Seems like an obvious upgrade from regular localstorage, but I've only seen it used with Blazor.
I'm using ASP.NET Core 6.0 MVC.
Should I just put this in my program.cs?
builder.Services.AddScoped<...
0
votes
1
answer
30
views
ASP.NET Core 6 MVC Ajax Upload to AWS Presigned URL
Whatever I do, I could not upload the file from the browser directly to s3 bucket on AWS.
This is how I generate the presigned url from .NET Core side
var urlString = string.Empty;
...
1
vote
1
answer
36
views
Information not appearing after button click ASP .NET Core MVC
I currently have a view page that displays language information in a table and an edit link that will take me to a new view page to edit the language information. I'm trying to make everything stay on ...
-1
votes
1
answer
90
views
strip_path and preserve_host attributes in KongIngress object
In a k8s cluster we have an ASP.NET Core 6 MVC web application. If I configure an ingress controller using NGINX ingress class -> using request host and path prefix / , target service the cluster ...
0
votes
0
answers
49
views
File returning IActionResult works on local but not when deployed
I have this code which i create a pdf and then return it to show. It works on my local, it opens pdf as result of that controller but when i publish it deploy to hosting same url gives HTTP500 error ...
0
votes
1
answer
59
views
ASP.NET Core 6 MVC - POST method not being hit when GET action method receives parameter
Why is this not working?
In create GET, I am receiving an optional idEnt parameter.
If I call in browser MyController/Create/5, it shows view ok, and even client validation works ok, but on form ...
1
vote
1
answer
33
views
Why does my ASP.NET Core MVC application add some identifier to HTML elements?
When running my new ASP.NET Core MVC application and viewing it in the browser, it seems ASP.NET Core added some kind of ID to some HTML elements.
I'm using .NET 6, and Razor .cshtml pages.
Why? And ...
0
votes
1
answer
80
views
Entity Framework Core add relationship between view and standard model objects
This is the scenario: I use SQL Server as backend, I have an instance with a database that has some common tables that I want to join with the tables in the database of my new MVC application.
We plan ...
0
votes
1
answer
65
views
Unable to bind checkbox on dropdown change in .NET 6
I am using .NET 6, and I want to bind checkboxes onchange event of dropdown. On dropdown onchange event, for loop is not executed. When I change the dropdown value, calling the Javascript method, ...
0
votes
0
answers
52
views
Multiple select dropdown list ASP.NET Core 6
When I create a post, I need a multi-select dropdown field, so I can select more than 1 category for 1 post.
I have created those entities: Post, Category, PostCategory
Do I need this PostCategory ...
0
votes
1
answer
82
views
Auth0: Single Log out for .NET 6 based apps using C#
We are using Auth0 as Identity provider. We are working towards Single Logout functionality. We are taking help from Auth0 support and its taking some time. Feels like we are the 1st Auth0 customer ...
0
votes
1
answer
177
views
.net 6.0 mvc app shows wwwroot folder directory listing instead of my application when I run the app
When I'm trying to run my project - dot net core version 6 - it shows me the wwwroot folder listing instead of running the app, I have tried to uncheck the launch browser from the debug profile of the ...
0
votes
1
answer
100
views
ASP.NET Core 6 MVC web app saying index.cshtml not found
I am creating a new .NET 6.0 application in Visual Studio 2022. When I run the default HomeController, the application is throwing a runtime exception saying index.cshtml was not found. But in the ...
1
vote
1
answer
90
views
How to add localization for default data annotations validation error messages in ASP.NET Core 6 MVC?
The idea is to make use of the default messages for fast development of apps and for cleaner code, but I couldn't figure out a way to do it.
This is how far I got:
// Program.cs:
using ...
var builder ...