Questions tagged as 'asp.net-mvc-5'

1
answer

Errors in HTMLHelper references

Visual studio throws me these errors that are seen in the image, even when I have the code well done and also when I run the page everything is fine.     
asked by 08.11.2016 / 21:36
1
answer

Calculate age with date of birth MVC5

I need to calculate a person's age from their birth date, but I am doing a poor calculation, I give you an example. Pepito was born on December 17, 1997, at this moment Pepito is 19 years old, but to me in the calculation he shows me as if he...
asked by 03.04.2017 / 22:30
1
answer

How to handle exceptions in ASP.NET MVC 5?

I am implementing the exception handling in an ASP.NET MVC 5 application, and I have chosen to use HandleErrorAttribute, here the code that implements [HandleError(ExceptionType = typeof(DbUpdateException), View = "Error")] public class Compan...
asked by 06.02.2016 / 03:48
1
answer

I need to make a responsive slider with thumbnail but that the proportion of the dimensions of the images is respected [closed]

I've been looking for a carousel slider with responsive thumbnail, without the images being deformed by the different sizes that I may have. I have seen several responsive bootstrap slider, but when placing images of widths and lengths different...
asked by 02.03.2016 / 00:14
2
answers

Send to a View the list of Customers in my database

I tell you that I'm doing a database where I register clients. And for the disabling of a client I use logical deletion, setting the property of Enabled = false to the client. Then, it occurred to me, that when I loaded my Create.html view, I...
asked by 01.11.2018 / 04:53
1
answer

how to display the files of a folder on a website

Currently I have a very simple console app that shows me the names of the files that are inside a specific folder. public void archivoCarpeta() { string carpeta = ConfigurationManager.AppSettings["carpetaDescarga"]; DirectoryInfo dir =...
asked by 29.08.2018 / 03:22
1
answer

Problems with the IIS and the database

A few days ago I published my MVC + AngularJs application in IIS. Everything works fine except the database, the GET, ECT requests do not want to work ... Launches the following exception:    This Request has been blocked because sensitive...
asked by 15.08.2018 / 14:36
1
answer

Show in details a list of ALL the materials that belong to two tables that have a one to many relationship with MVC 5 and EntityFramework

Greetings to all I am new to MVC and I have a problem to show the following model, the table OutMaterial stores the permissions on some kind of material that goes out, the table OutlineMaterial stores specifically the materials that are...
asked by 03.07.2018 / 19:49
2
answers

Convert DbSetT to different data type in EF - Linq

I'm working on an expression Linq in which I get an object of DBContext , and I want to convert it into an object of ViewModel My ViewModel receives as parameter an object obtained from DBContext to work the...
asked by 27.06.2018 / 14:29
1
answer

Compare values obtained from the same query

I'm new to C #, I'm doing a web application in VisualStudio 2015, with ASP.NET MVC5 and EF6. I need to compare the values that a linq query throws at me, normally I would do it with a two for , one within the other, although maybe they can...
asked by 15.03.2018 / 15:18