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

1
answer

Prevent user from being logged in twice

In my project, I have a login module that works perfectly. So quiet, but the way it is I can not bar the same user logged in twice. That is, I can log in with the same user twice, and that's not what I want. Because I can have problems with that...
asked by 30.11.2014 / 01:37
2
answers

Master Detail with select2

I'm trying to make a master detail One of its inputs is Select2 , but it does not generate Select2 , because it is only generated when the script finishes reading, and the second way I did, was to do a function that calls the sele...
asked by 19.12.2014 / 18:42
2
answers

Asp.net MVC cache doubt

I have the following scenario: Public ActionResult ProdutoFornecedor01() { var produtos = _db.Produtos.Include(x => x.Fornecedor).OrderByDescending(x => x.ProdutoId).Where(x => x.Fornecedor.Id == 1).Take(10); return PartialV...
asked by 23.12.2014 / 22:59
1
answer

Configure routes using ASP.NET MVC 5 areas

I'm trying to set up a route using area as follows: No RouteConfig.cs public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes...
asked by 01.06.2015 / 01:01
1
answer

Global FIlter in MVC 5 is not working

Hello. I'm following the tutorial below with the intention of better understanding the .net Identity authentication process with OWIN. link When accessing Home, it should redirect to the auth / login and this is not happening. It's as if...
asked by 22.09.2014 / 22:39
1
answer

Add values from object list columns in Razor

I have a table, where I get the data from a View (SQL Server) and perform some operations on my page. On this page, I have a filter, to display only the pages for the selected year. Until this part is all correct, along with the filter, such...
asked by 26.03.2015 / 21:18
1
answer

Authentication, email / password and knowing the correct bank

The idea is a SaaS application. Where there will be only 1 deploy. and clients will be separated by bank Once this is done, there will be a login screen, where you will be informed of the login (email) / password But how do I route it t...
asked by 14.08.2014 / 02:15
1
answer

RegularExpression only letters in the Model

Using the following RegularExpression in Model: [RegularExpression(@"^\d+$")] public int ano_da_configuracao { get; set; } I get the following result: Itriedthefollowingwaytoacceptonlyletters:[RegularExpression(@"/^[A-ZÁÀÂÃÉÈÍÏÓÔÕÖÚÇÑ ]+...
asked by 11.02.2015 / 18:21
1
answer

How to list related data

In my project I have two tables: Student and Occurrences. And they are related so that a student can have multiple occurrences. My need is: In the student Details view (Details.cshtml), I need to show all occurrences related to the student. That...
asked by 30.05.2014 / 21:07
1
answer

Error in view when using DisplayFor and foreach

I made this html within my cshtml. I was doing a foreach and gave error in foreach and also did not recognize modelItem. In the Models folder are my edmx, so T_PDV is a BD entity mapped to this edmx. @model SuporteTecnico.Models.T_PDV @{...
asked by 14.05.2014 / 16:14