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

3
answers

Controller returning HTML to View is wrong?

I used this solution because when trying to render a table in a view with many records the user's browser gave Crash, I know it's a not very elegant solution but it was the only solution that came to mind. (In this view I have to load all recor...
asked by 27.08.2014 / 14:07
2
answers

Using DTO and ViewModel in ASP.Net MVC Project

I have an ASP NET MVC 4 project with the following projects: Domain Repository Contracts (interfaces) DTO's And the web project The web project "sees" only the repository project and it is responsible for executing the business ru...
asked by 18.09.2014 / 16:33
2
answers

What has changed from MVC4 to MVC5?

I have read some topics on the subject, some say it has changed very little, others say that it was very important changes. I would like to know your opinion on the subject, I currently do projects with WebForms so I do not have any knowledge ab...
asked by 02.12.2015 / 14:13
1
answer

Pagseguro Return - Solution

I use C # Asp.Net MVC, I had to make the return of data from Secure Pag and I found the documentation a lot flawed, follow the solution I created below for those who have the same difficulties.     
asked by 25.08.2015 / 15:30
4
answers

List all Roles in CheckBox and mark the roles that the User has

I am creating a User Management System in Asp.net MVC 4 with two Simple Tables. Users and Roles. I can create the users normally by selecting the Roles that they will have. At Edit time I'm trying to list all the Roles in CheckBox and c...
asked by 19.02.2014 / 16:25
1
answer

Filter in DropDown using C # MVC 4

I have a dropdown in my view that I fill in as follows: ViewBag.NfeStatus = EnumHelper .ListAll<NfeStatus>() .ToSelectList(x => x, x => x.Description()); My NfeStatus model is an enum: public enum NfeStatus {...
asked by 17.01.2017 / 12:33
3
answers

What difference between DropDownListFor and DropDownList

What is the difference between DropDownListFor and DropDownList? And when and which one to use?     
asked by 11.02.2015 / 13:20
1
answer

Sort 2 columns at once - Asp Mvc + FluentNhibernate

Good morning! I would like to know how to sort two columns at a time in a query so that it is, in my case, 1st in descending order of date but in alphabetical order. public IList<Analise> ListaTodosOrdenado() { usi...
asked by 11.10.2016 / 17:23
1
answer

Custom RoleProvider

I'm implementing authentication with% custom%. I have a class RoleProvider and a class Usuario with many to many relationship. I created a folder in the project called Role and within the folder a class named Securi...
asked by 11.03.2014 / 00:16
2
answers

How do I prevent a property from being mapped to an entity in the Entity Framework?

I need to insert a property in the template class, but when I enter the code first, it says that the table already exists and changes have been made. My code: public class Data { [Key] public int Id { get; set; }...
asked by 04.03.2014 / 15:37