Questions tagged as 'mvc'

2
answers

How to subtract dates in a linq query

I need the subtraction now - a.DateLowStock to be> = 14 days. How can I do it? ICollection<Product> products = new List<Product>(); DateTime now = DateTime.Now(); using (ApplicationDbContext db = new Applic...
asked by 07.11.2018 / 19:38
1
answer

Problems uploading files in Laravel 5.5 project in a hosting

I am uploading a Laravel 5.5 project to the free 000webhost hosting. A user can upload images to a post, when I try it on the computer without uploading it to a hosting it works perfectly. The image is uploaded to the public / image folder of th...
asked by 12.04.2018 / 03:26
1
answer

how can I validate a data model with mvc

Am I processing my save information through AJAX, sending parameters in a JSON string that I later get in the controller, how can I send error messages in the fields of the view that are wrong? $('#btnGuardar').click(function () {...
asked by 12.04.2018 / 01:28
1
answer

How do I pass an image from my view to a controller? MVC

Hi, I have the following problem, I need to get an image of an input and pass it to the controller; The code I use is the following: HTML: <div class="row"> <div class="col-xs-12 col-sm-10 offset-sm-1"> <input name="...
asked by 19.04.2018 / 05:34
3
answers

Variable Error Null in C # [duplicated]

Hi, I have the following code and when I run it I get the error that the variable facturaedit.Detallefacturas[i].IDDetalleFactura is Null. code: public ActionResult Edit(int id) { //Instanciamos el modelo (los modelos sie...
asked by 20.06.2017 / 20:07
1
answer

Get the customer's date, not the "SERVER" in C #

I am trying to capture the date of a client LOG IN on my portal. when using DateTime.Now I am capturing the time of the server, what I need is to obtain the time of my client, since the server is in a country where the schedule does not m...
asked by 12.07.2017 / 17:51
3
answers

I open a modal form in ASP.NET MVC and it appears as inactive

Good evening I have a little doubt, I'm opening a modal form and when I press the button that opens it, it comes out as if the modal form was inactive (I attached the image) and if I click on any part, it closes, maybe I'm forgetting a library?...
asked by 22.03.2017 / 02:34
1
answer

list data in a partial view by passing it from a modal window

I have a modal window with a form from which I want to return the data entered in a partial view and put them on the list as they are added I already have the modal window with an Ajax.BeginForm () and I pass the data to the partial view through...
asked by 25.08.2016 / 18:28
1
answer

Return Saved Registry ID (AJAX - MVC5 - ASP.NET)

I have a form that is sent by Ajax and stored correctly in the database. How can I make that at the time of saving, it returns the ID of that record that I just stored ?, since in another part of the document I have another form that needs that...
asked by 28.08.2018 / 00:45
2
answers

Change the name in my url of the MVC4 controller

I need to change my Url: localhost: 44301 / service by localhost: 44301 / product service is the controller, I just want to change its name by product but keep calling service.     
asked by 29.11.2018 / 19:50