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

1
answer

Does anyone know why I get the datetime?

Some help I'm bringing with asp.net mvc the tables I call it with ajax     
asked by 16.11.2018 / 02:16
1
answer

ERROR: Another SqlParameterCollection already contains SqlParameter

I'm using SqlParameter, when I use it twice I get this error: {"Otro SqlParameterCollection ya contiene SqlParameter."} Here I use it the first time: SP2 using (ApplicationDbContext db1 = new ApplicationDbContext()) {...
asked by 28.10.2018 / 01:13
1
answer

How to modify the webconfig connection string from the controller

I have this conexionstring and I would like from the controller to change the data source and other parameters, how can I do this? Thanks in advance     
asked by 17.01.2018 / 16:47
2
answers

Two Models in an MVC view 5

I have two Models: public class Solicitudes { public int SolicitudesID { get; set; } public DateTime FechaEmision { get; set; } public DateTime FechaInicio { get; set; } public DateTime FechaFin { get; set; } public string...
asked by 09.10.2017 / 23:30
1
answer

As valid that when an excel does not contain anything, do not download it by javascript?

How can I validate from my next code js that when the answer is null do not download the file excel and be able to display a message. I already generate the excel with the data but in the case that it does not contain...
asked by 29.09.2017 / 14:45
1
answer

sending parameters from asp.net mvc to sql server

I need to send these parameters to Sql Server to be used in my stored procedure: (int[] DedudccionesId, DateTime FechaDesde, DateTime FechaHasta) //POST: Detalle Planilla Empleado [HttpPost] [ValidateAntiForgeryToken]...
asked by 23.10.2018 / 05:38
1
answer

Pass a list from the action in my view in MVC 5

I have the following query in the Action Then in my Vista I try to show the table in the following way using @ item.cantRevised I would also like to know if in MVC 5 you can pass a list in this case consult with LINQ through t...
asked by 16.06.2018 / 20:44
2
answers

How to return the value of an HttpPostedFileBase in a Post method of the MVC Controller C #

I have a model like the following: public class Model_ejemplo { public HttpPostedFileBase image { get; set; } } in my controller I receive my model with this property [HttpPost] public ActionResult index(Model_ejemplo Model) { Retur...
asked by 21.05.2018 / 15:55
0
answers

Property always NULL in Rest Api

I have the following entity: public class EntityBase<T> where T : class { [DataMember] public int CurrentItemCount { get; set; } [DataMember] public int ItemsPerPage { get; set; } [DataMember] public int StartI...
asked by 30.04.2018 / 17:25
0
answers

MVC 4 + NEST (ElasticSearch)

I am using MVC 4 and would like to use NEST (ElasticSearch). Currently, to connect to ElasticSearch I am using RestSharp and I am sending this through POST to get results and I would like to know how to convert it to NEST. { "query": {...
asked by 19.04.2018 / 09:54