Questions tagged as 'asp.net-mvc'

1
answer

Asynchronous module or handler completed while asynchronous operation was pending

I'm trying to send an email asynchronously, without having to wait for the return. But when I do not use await I get an exception on return to action . Code:publicTaskMissaoAvaliada(stringusuario,stringdestinatario){_email.From=new...
asked by 30.08.2017 / 02:58
1
answer

Controller getting parameter array as null

I am making an AJAX request, but I can not pass array ... My controller looks like this: [Route("imoveis/BuscaDados/Json/Listas/ListaQuartos")] public JsonResult ListaQuartos(int idEstado, int idCidade, int[] idsBairros, int[] idStatus)...
asked by 16.01.2018 / 14:09
1
answer

Is it possible to know in which routes.Map () the call of an Action crashed? ASP.NET MVC5

Then # I have two routes.MapRoute() routes.MapRoute( "Home", "Image/{id}", new { controller = "Home", action = "Image", id = UrlParameter.Optional }, new { id = @"\w+" } ); routes.MapRo...
asked by 18.08.2017 / 18:03
1
answer

ASP.NET.MVC Basic question - Register with "subform"?

I'm working on my first ASP.MVC project with C # and am joking with the student enrollment. On the student's registration page there is a CheckBox that when checked (I imagined) should enable the addition of allergies that the student may have....
asked by 11.08.2017 / 14:04
2
answers

Date range C #

I have a table in the database named Quota, this quota has two columns one for start_date and end_date, so far so good, now I have another table called Order that also has start_date and date_fim, these tables are related 1 for N, one quota can...
asked by 11.08.2017 / 16:07
2
answers

Remove undisclosed user from the database

I need your help, I created two classes inside my Controller, where I can pull a user from one page and send it to another. As if you were deleting but not deleting from the database. I created a variable in my database called Removed wher...
asked by 14.06.2017 / 20:48
1
answer

Return Controller List to View

I have controller where I validate the information of ModelState , I store the errors in a list. I'd like to take this list and return it to my view. But I'm a beginner and I can not understand how I can do this, could I use...
asked by 09.06.2017 / 01:57
1
answer

How to get value from TempData with Listobject?

Follow the code below: List<object> list = new List<object> { "abc", // string 1, // int true // bool }; TempData["ID"] = list; The following code can not fetch value: var data = TempData["ID"...
asked by 21.05.2017 / 05:21
1
answer

Doubt with @ Style.Render

If I put in my view Layout this line: @Styles.Render("~/Content/css") I'm stating that all .css files in Content folder will be rendered? That is, I do not need to explicitly put .css in my view , is that it? If ther...
asked by 21.05.2017 / 15:21
2
answers

Where to put an object that is not an entity in the DDD

My project in ASP.NET MVC in C # has a Domain layer where I have entities, and business rules. I need to add a new rule where I should return an object with an internal list, but I ended up having a discussion about DDD rules with my colleagues...
asked by 14.07.2017 / 14:13