Category "asp.net-mvc"

How to Secure Cookie in MVC

I have an application in MVC which is consuming some third party APIs. While running application on server I am getting below 4 cookies in browser and one of th

ILoggerProvider with generic types

colleagues! Im trying to create app with Onion arch and several GUI. I used lib Log4net as my log provider. I created my own IMyLoger interface at application l

Trying to Edit and Continue on a cshtml file is always throwing an exception

When I make any change to a CSHTML file while debugging then reload the page, I get this exception. This used to work, and I'm not aware of any changes that cou

Azure AD login automatically for a specific user

I'm in the process of migrating an ASP.Net MVC app from windows authentication to Azure AD Authentication. One of the requirements of the app is that some parts

Duplicate keystrokes on cshtml editor

I'm having a strange problem in Visual Studio 2022, and would like to know if someone else faced it. It only happens when editting .cshtml files, on Asp.net MVC

Visual Studio 2022 MVC Object Reference Error with @Script.Render(~/bundles/bootstrap)

I'm a beginner college student working on a group project in MVC. Things had been going relatively well until our most recent code update. When testing the app

Why does select2 return null?

I have a class "MetaKeyword" and an a class "Article", which has a List MetaKeywords atributes. These metakeywords are stored in db and users select them for th

Fetch Products from database with category and subcategory attached

I am building a web api and want to fetch all the products from product table I have in my database and I also want to include the category and subcategory whic

ASP.NET MVC / Entity Framework - Controller generation is somehow using old properties

After adding and altering columns in the SQL database, I've refreshed the Entity Model (Entity Framework 6) and deleted all controllers and views, to generate t

How to convert seconds to minutes in MVC?

I get the input as a second from the user and I want to show it as minutes and second in the Grid. I know I have to use a method but I don't know how. **Seizure

Consume SSL Secured APIs in ASP.NET Core 6 MVC Client

We have an application that has two projects as follows (1) AppClient – This dotnet core MVC project and it is running on WebServer on IIS (2) AppService

What to return after Ajax call asp.net

After ajax call is completed and the model is posted successfully to the controller, what should the controller return? In my case, I just want to add an item t

How to automatically add a name from selected id in View page from controller ASP.NET MVC

I want to get a name from selected id in my view page First Model public class Transaction { [Key] public int Id { get; set; } [Required] public

How we can call python POST request API from JQuery Ajax It showing CORS policy error

I have python API which is POST request, http://192.168.2.25:8059/calculation In Postman it return response like (Expected output should be same as like below)

Iterate through a list in C# MVC and access properties

I have created a view that accepts a ProjectsCreatorsVM class. This class has been structured this way: public class ProjectsCreatorsVM { public List<Pro

Use multiple models in one view

I want to use 2 models in a single view. Here is my index view markup: @model IEnumerable<Enteripse_web.Models.Post> @model PagedList.IPagedList<Enteri

there`s an error in uploading image to firebase storage from Asp.net MVC the folder path isn`t shown(ex:super-market-7f7a3.appspot.com/)

theres an error in uploading image to firebase storage from Asp.net MVC the folder path isnt shown(ex:super-market-7f7a3.appspot.com/) controlerpage1 controlerp

Pop-up doesn't show up in MVC

I'm trying to add pop-ups for login but they don't show up. When I make some changes messages work right but they show up as Json. Now only the RedirectToActio

Blank page with no error after i scaffolded Identity

After i scaffolded identity when i run my project it gives me a blank page and the project doesn't have any errors, manually going to a page doesn't work either

.NET MVC - Enabling script sections for AJAX-returned partial views

I would like to make use of the (script) section in ASP .NET MVCs, i.e : @section script { <script>alert("hello");</script> } ...but with parti