Questions tagged [asp.net-core-mvc-2.0]
For specific questions on ASP.NET Core MVC version 2, please use the asp.net-core-2.0 tag together with the asp.net-core-mvc tag.
asp.net-core-mvc-2.0
222
questions
0
votes
1
answer
68
views
Why am I not able to use session storage to store emails? (working on ASP.NET Core MVC)
I am trying to set the session string in the below action controller. Where I set the email.
[HttpPost]
public IActionResult LoginFunc(Login model)
{
try
{
bool employeeIdExists = _DAL....
1
vote
0
answers
48
views
Razor page always shows Production for environment variable even in visual studio IIS Express (Mac OS)
I am trying to load a certain script tag development and production however when I run IIS Express and output to console it is always production. Is this a glitch or am I using this incorrectly.
...
0
votes
1
answer
19
views
Is the model sent to a view the same one that's returned on a submit because I'm not seeing it?
The values are loaded then sent to the view but when I click submit the model comes back with no values. How do I resolve this?
Example View Model
public class ExampleViewModel
{
[Key]
public ...
0
votes
0
answers
893
views
in Visual Studio 2022, Break point is not working
When i put a break point on code line in visual studio 2022 it didn't stop on that line.
I'm trying to develop an Asp.Net Core Mvc project. I had a more project too. And break point is not working in ...
0
votes
0
answers
248
views
"ORA-00933: SQL command not properly ended" in .net core 6 Api
Hello I'm trying to run the below query in.net core 6 and oracle DB but an exception throw ORA-00933: SQL command not properly ended error
_entity.atms.Where(p => p.Atmid == atmId).FirstOrDefault();...
1
vote
1
answer
948
views
Consuming .Net Core WebAPI protected with JWT, from .Net Core MVC Application always returning 401 Unauthorized
I am working on a side project for learning purpose and I have a .Net solution containing a .Net Core Web App and .Net Core Web Api. In the Web Api, I am letting the user to log in and create a JWT ...
0
votes
0
answers
92
views
I want when i enter string value in form Controller Return value in Id
This is My Controller
Please Tell me How to solve This Issue
I want when i enter string value in form Controller Return value in Id but it return in String
This issue was occur when i can save data in ...
0
votes
1
answer
302
views
Windows server2012r2 how to create multiple subdomain site
I'm creating an application that accepting users as sub-domains,
Ex: {user_id}.mywebsite.com, thus, every request has to be *.mywebsite.com.
Problem is that every sub domain has to be bind on the iis
...
0
votes
1
answer
564
views
connect filter to multiple charts asp.net core mvc
I would like to control 3 charts with one filter, the page will contain a filter floating to the right and three charts at the left,
the charts are in a javascript file called dash.js, the charts were ...
0
votes
0
answers
837
views
Best Practice to Send Unique Booking QR Code to customers through e-mail in ASP.NET Core MVC
I'm developing a room booking website using ASP.NET Core MVC. The requirement is that every time when customer do the booking, the system will assign a unique booking Id and generate the QR Code for ...
0
votes
1
answer
539
views
DBcontext class in separate class library with Asp.net core webapi application
Solution explorer image and
package manager console image -
I am trying to add migration by giving command like this:
Add-Migration
addingtable -Context SampleApplicationContext" it is ...
0
votes
0
answers
218
views
Razor dynamic compilation of view files
I have an console application targeting .NET 4.7.2 with SDK Microsoft.NET.Sdk.Web and using MVC Core 2.2.
What i want to achieve is to have the views to be precompiled BUT with an ability to override ...
6
votes
2
answers
1k
views
Pass sub object to partial view from views with different models, have it bind when form is posted
I have an ASP.net MVC Core 2 (can upgrade to 3 if required) web app.
There are several different classes, landlord, tenant, contractor - they each have an address object, and other different ...
0
votes
1
answer
130
views
How to realize a generic DI?
I have multiple services, and multiple repositories. All my services contain a Repository, and a Mapper.
So, I have created a BaseService like this :
public abstract class BaseService<TEntity, ...
4
votes
1
answer
2k
views
Swagger - customize request body
I would like to customize request body in swagger-ui generated with SwashBuckle for .Net Core.
I need that when user click on "Try it Out" in swagger-ui, the request body to be different from the [...