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

3
answers

getting description with EnumDropDownListFor asp.net mvc5

How do I get the description using the Asp.net MVC 5 html EnumDropDownListFor helper? I have my enumerator public num Dias { [Description("Segunda dia de trabalho")] Segunda = 1, [Description("Terçadia de trabalho")]...
asked by 28.08.2014 / 16:12
2
answers

The sequence contains no elements

This is the error it gives.    An exception of type 'System.InvalidOperationException' occurred in System.Core.dll but was not handled in user code Below is my expression that generated the error: if (refeicoes != null) { for (int i...
asked by 08.04.2014 / 16:45
3
answers

Get logged in user

In my project I have an authentication module and logout . But I wanted it when the user logged in I would take the id from it so that I would display information about the login of it. Type a view of same details. But that the user who l...
asked by 18.11.2014 / 14:09
3
answers

Application that does not need to load entire page

How can I create an application in MVC C# with Razor , where I have a Layout and then only update the central content and not the page as a whole. I have read some places to use AJAX other to use PartialView . But wh...
asked by 21.05.2014 / 21:17
2
answers

Difference between ViewResult and ActionResult

What is the difference between ViewResult and ActionResult? Normally I call a View using an ActionResult, but I've already seen code with ViewResult. Then came this doubt.     
asked by 21.04.2016 / 23:15
2
answers

Validation without the "ModelState.isValid"

I have the following scenario: [HttpPost] public PartialViewResult Create(string dados) { var clienteViewModel = DeserializeJson<ClienteViewModel>(dados); if (ModelState.IsValid) { } // Não têm como validar....
asked by 25.11.2016 / 18:52
2
answers

Modal display when submitting a form

How do I display a modal the moment I submit a registration form? The content of this modal is only a message. The following happens, in this form a file and information is sent. Since it usually takes a few seconds for the upload to take place,...
asked by 25.07.2015 / 21:32
1
answer

Good practices with .NET MVC

I have an ASP.NET MVC application and would like to know what are the best practices that microsoft indicates in the organizational question of the solution, using the latest technologies like ASP.NET Identity. Assuming the following scenario...
asked by 21.11.2014 / 20:46
3
answers

C # MVC Execute Function (LogOut) When Closing the Browser

I'm in a service system and I need help to understand how I can call an event (Javascript / jQuery / Not) when a user closes the browser without a "correct" system logout. . Att.     
asked by 15.09.2015 / 20:42
2
answers

Hide different actions for different user profiles

I am in a project where I have 3 different levels of profiles: Administrator , Teacher and Coordinator . I already have the login module, registers and such. What happens is that I wanted for each profile type to appear only what is allowe...
asked by 25.05.2014 / 03:15