Questions tagged as 'asp.net-mvc'

1
answer

asp.net MVC does not recognize dates in dd / mm / yyyy received via GET

I'm doing a filter for a paged list. The values of this filter must be sent via ajax with verb GET. This is the model: public class FiltroViewModel { public DateTime? CriadosDe { get;set; } public DateTime? CriadosAte { get;set; } }...
asked by 04.10.2016 / 17:08
1
answer

Set time zone for the entire project

I recently hosted an application on a North American server, so the dates are outside the Brazilian timezone. This way, I would like to know if there is a way to set the time zone only once so that every time you use DateTime.Now in a var...
asked by 18.07.2016 / 15:05
1
answer

Update the index of the row of a table html

How do I update the row index of a table html after removing it? I better explain I have a table that I can add or delete items to add I use an auto increment variable: _contaLinha++ : Add items to the table: function Adicionar() {...
asked by 04.05.2016 / 00:30
2
answers

How to upload .txt file and save to a directory using c # .net mvc?

I would like to upload text files where I select N .txt files and save them to a directory I have specified in the application; I made an example that was on the internet but I could not get the files in my action. Action: [HttpPost]...
asked by 30.03.2016 / 16:17
1
answer

Error registering data in ViewModel

I have this question where I where according to the answers, my logic ... Only now, when registering the data, an error was generated. This error refers to the property of a view that can not be null, which is the ID. That is, from what I unde...
asked by 28.05.2016 / 23:00
1
answer

Access controller of another project in the same solution

Personal I have 3 projects in the same solution: KnockDocWeb, KanoDockModels and KnodockApi as shown below: When I compile the project it starts KanoDockWeb, however I want to access a controller that is in KanoDocApi by KanoDockWeb....
asked by 28.05.2016 / 18:45
1
answer

Allocate search box in default Bootstrap navbar

I'm having trouble allocating a search box in the bootstrap. I'm trying to allocate it in% default%, at the top right-aligned. My intention is that at each screen, I can modify the parameters for the field to work with each type of search like:...
asked by 25.05.2016 / 04:02
1
answer

Entity framework many-to-many IEntityChangeTracker error. How to solve?

I have a many-to-many relationship and my tables are correct about the relationship in the database. The problem is that my insert works perfectly when you do not use an existing entity in the database, but when I search the database and add it...
asked by 26.02.2016 / 03:57
1
answer

ASP.NET MVC Post Date Format

I have a form that sends via post the search parameters, however the parameter of type date whenever it arrives in the action the month and day are inverted, for example, if I put in the page the date 04/03/2016 in the control arrives 03/04/2016...
asked by 10.03.2016 / 16:04
1
answer

Problem with Dates in ASP.NET MVC

In my model I have the following field: [Column("sdt_DataReferencia")] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")] [Display(Name = "Data Referência")] [DataType(DataType.Date)] public DateTime DataRefer...
asked by 07.03.2016 / 18:55