Questions tagged as 'asp.net-mvc'

1
answer

Load excel data on the screen [closed]

I have a problem loading data from a worksheet on the table. The system is done in C # MVC5 with razor and entity framework, I need the user to choose an already filled excel file and with the data of that file I have to present it in a html...
asked by 28.07.2017 / 21:25
1
answer

What is the best way to save multiple image links in a database?

List<String> _lista = new List<String>(); [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create(Veiculo veiculo, HttpPostedFileBase[] file) { for (int i = 0; i < file.Length; i++)...
asked by 05.09.2017 / 18:10
1
answer

Change Label in view in Asp.Net MVC Project

I created a class in the Model named Payment.cs, where it has the exactly spelled attributes as the name of the fields of my pay table in the DB. I created a view for the payment information to be registered, but besides creating the view and li...
asked by 08.09.2017 / 03:21
2
answers

JsonResult Display DisplayName of an Enum

I'm having a problem returning the DisplayName of an enum I have the following Enum public enum TipoPessoa { [Description("Pessoa Fisica")] [Display(Name = "Pessoa Fisica")] [JsonProperty("Pessoa Fisica")]...
asked by 12.09.2017 / 19:47
1
answer

How to get the value of the input hidden inside the controller using FormCollection?

I'm trying to get the value of an input hidden inside the Controller by FormCollection, but the value is zeroed. To increase the value, I'm using a JavaScript function. HTML: <form id="adicionarTituloManual" action="~/Movimento/Adici...
asked by 19.06.2017 / 13:43
1
answer

Asp.net c # DDD - problem passing data from Entity to ViewModel

I'm developing an ASP.NET MVC project, with DDD structure and using Simple Injector. I can perform persistence in BD normally, but at the moment of retrieving the information and displaying it in a list, it presents the following error message....
asked by 21.08.2017 / 00:03
1
answer

How to traverse all columns of a table with jquery and hide if it is empty

I have a table html with 15 lines and I need to go through all the columns and check if there is any value, if Column is equal to empty then hidden column, this example below hides the position 5 column, but how to traverse the columns?....
asked by 17.06.2017 / 05:10
2
answers

TemplateState Validation Error

I want to return the validation errors of my model. I just get an error message when I try to register.    System.Linq.Enumerable + WhereEnumerableIterator'1 [System.Web.Mvc.ModelErrorCollection] I'm putting validation in controller :...
asked by 08.06.2017 / 01:51
1
answer

Correct value still within View

I would like to know how I can change the value of @Model still in the view, before sending it to the server and which is the best way to do this? Example: @{ var model = (Pessoa)Model bool isAtivo = pessoa.IsAtivo }...
asked by 30.03.2017 / 17:42
2
answers

Entity Framework - When editing, fails in "db.Entry (category) .State = EntityState.Modified;"

I have a "Category" Entity, which contains id, name, created, and updated. I'm using Code First. This is my template: public class Category { public int CategoryId { get; set; } public string Name { get; set; } public DateTime C...
asked by 31.03.2017 / 17:01