Questions tagged as 'asp.net-mvc'

2
answers

Model error on a razor page

I have this cshtml @model IEnumerable<TreinamentoCrud.Models.Cidade> @{ ViewBag.Title = "Index"; } <h2>Index</h2> <p> @Html.ActionLink("Create New", "Create") </p> <table class="table"> <tr...
asked by 09.08.2018 / 15:28
2
answers

Create and Edit OneToMany with ViewModel

I'm creating a simple news application in ASP.NET MVC 4. I have a News category and a Category. I made a ViewModel public class NoticiaCategoriaVM { public Noticia Noticia { get; set; } public SelectList Categorias { get; set; }...
asked by 07.03.2014 / 20:44
1
answer

Getting value from array mvc

I'm passing an angular array by JSON this way: $scope.gravaItem = function () { $.ajax({ type: 'GET', url: '/TaxaPreco/SalvarItens', dataType: 'json', contentType: "application/json; cha...
asked by 07.06.2018 / 16:48
1
answer

Validate empty fields in XLSX file - (EPPlus) ASP.NET

I'm doing the import of an XLSX file in C #, using ExcelPackage . I make some validations in the Ex import: Numeric, text and if the field is empty. Note: If all the columns in my file are filled, the import is successful. One of the ap...
asked by 04.06.2018 / 16:16
1
answer

Doubt generating entity from the cs file code in edmx C #

In the ".Net Framework 4" version I have a project that when using .edmx made the automatic generation of EdmSchema where in my project I did so: 1 - ADO - (Class Library Project) 2 - .edmx file 3 - An Interface using System; using Sy...
asked by 31.08.2018 / 04:09
0
answers

How to know the query failure in Sql Server profiler

I have an application, which performs the API tests by postman. Debugging the app, the test goes through all my layers and returns: 'status: 200 ok'. However, the object is not inserted into my table. I have tried to map a request to the Sql...
asked by 04.04.2018 / 01:57
1
answer

Creating folder of ASP.NET Core files

Hello, I am generating a file folder via code, but it does not appear as if it were actually inside the project / solution, like this: Iwouldliketocreate(viacode)thearchivefoldersothatitisactuallywithintheproject/solution.Likethis: Than...
asked by 17.08.2018 / 02:37
1
answer

How to Change Default Validation Message Language for an ASP Application. NET MVC

I have a template like this: [Display(Name = "Protocolos Abertos")] public int ProtocolosId { get; set; } I use in a SelectList as value , when I will submit a form the validation message is returned in different languages for localho...
asked by 29.11.2017 / 14:08
0
answers

HTM file reading error for HTML conversion to JSON file

In this Topic that I created I was asked how to download the zip file from the Mailbox server and unzip it to my perfectly hosting service . After the previous events described, I want to read the html, but this is giving the file locat...
asked by 02.11.2017 / 02:24
1
answer

In an MVC 4 C # Web Application model, on what layer can the ADO.NET Entity Data Model file be?

On what layer do I put it? Model control or view? ADO.NET Entity Data Model which connects to the database.     
asked by 16.11.2017 / 15:41