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

1
answer

Download session contents in a class

I have a website that works like this. It has 6 steps. Routes, Air, Hotels, Services, Summary and Payment. Every step of the way, I record in a session. After choosing each product in the session, another session is created and passed on. Well,...
asked by 17.04.2014 / 20:04
1
answer

Problems with references and MVC

I have a project where it works. I needed to create another project elsewhere and I was enjoying what I already have. It turns out that it is giving an error in base.Initialize (...) saying that it does not recognize this face. I put the same us...
asked by 22.04.2014 / 20:39
2
answers

ASP.NET MVC - Route does not pass values to the Controller

I created a new Controller named Conteudo . Then I created an Action on it called conteudo and added a new View called Conteudo . Before it was PaginaBase and the Controller of Home . Well, I copied the contents o...
asked by 10.03.2014 / 19:44
3
answers

Declare variable within my cshtml

I have this code in my cshtml file <div class="grid_19 box-resultado"> @{ string nm, dia, mes, ano, sexo, numpassaporte, diavalidade, mesvalidade, anovalidade, paisemissao, dados = ""; ....... I need to dec...
asked by 14.03.2014 / 20:35
2
answers

Associate a controller with an existing view

Normally, when we create a Controller and associate a View with a Action , we right click on Action and Add View . Then it creates View , folder, and so on. Now, when there is already a View , and I want to as...
asked by 13.03.2014 / 13:27
1
answer

Grouping in foreach and view does not work

I created and set one variable to control the following. My LINQ returns me today 5 thousand lines. That variable, it's there to prevent it from repeating the same thing, like. Let's say that the linq returns 400 motif of ID = 1. Soon this varia...
asked by 16.09.2014 / 21:32
1
answer

Nest tag ul in another tag ul with foreach

I have this foreach, which I did with your help here at SOPT. I made it work, but it worked. Only I did it with just one knot. What I'm going to need is this. I have a parent node, inside that parent node a child, inside the child a grandson and...
asked by 16.09.2014 / 15:29
2
answers

Jquery does not date correctly

I did this and the msg is: Invalid Date . I think it's because everything turned string. How do I bring only the numeric part in the date? Incidentally, I say this, because I can not return a date in our format within jQuery . In alert give...
asked by 16.06.2014 / 19:15
1
answer

Update User Role ASP.NET Identity

Hello everyone, I'm finding it difficult to update the user role when updating my data, my roles are being filled through a ViewBag in my get from my controller and I'm retrieving the new ID in the post from my controller through the request. fo...
asked by 14.12.2018 / 21:53
1
answer

How to execute a method at the initialization of ALL Controllers?

I have a static class that loads the language against the cookie stored or the URL. In every controller I have to insert the following method once: protected override void Initialize(System.Web.Routing.RequestContext requestContext) {...
asked by 28.11.2018 / 13:07