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

2
answers

Json format in return

I need to pass a json in the following format: {rows:[ { data:[ "1", "Nome teste", "Descricao teste"] }]} But when using jsonresult in my action, I do not know how to return that way public JsonResult Data(...
asked by 20.08.2014 / 15:44
1
answer

Where to place the asynchronous request methods following the ASP.NET MVC standards?

I've always put it on View Controller, is it the most correct way to do it? I came to doubt because I realized that I am filling my view of asynchronous methods, and I would like to leave it all separated so that I do not get lost. I've never...
asked by 28.09.2017 / 16:03
1
answer

Fill date and time in View mvc 5 razor

I have a registration form where I have a record date field that I currently fill in my save method, except that my server is hosted in another country where the field is being filled from the location of the hosting, quite different from where...
asked by 12.12.2018 / 19:27
1
answer

How to use ViewModel in MVC 5 C # with Entity Framework?

I'm trying to learn how to use the ViewModel concept, so I did a basic project, but I'm having difficulty. I have the following Models: Person id type document Physics id name surname document Juridica id...
asked by 02.09.2017 / 01:50
1
answer

Make a button to add properties in a list using the BeginCollectionItem C #

I have a people register and I need to create a button to add multiple phones and send to my controller, I'm using BeginCollectionItem, based on my other question Form using BeginCollectionItem gets null viewModel in foreach just missing the b...
asked by 14.08.2015 / 22:04
1
answer

How to change the status of a field with Javascript

I'm developing an application that manages Courses , I'm a beginner in ASP.NET MVC. In my application I have a screen that the Student makes your Enrollment in a course, I also have a field Number of Jobs and another field Status that s...
asked by 02.07.2015 / 04:11
1
answer

Compare TXT file with table in database

I have a TXT file generated by SISOBI , which contains a list of people who died. This txt is generated, and I need to read the file and compare the CPF , which is the only key present in the file, with my database and check if it has...
asked by 20.03.2015 / 18:26
1
answer

How to save Disicpline?

I have the following problem in my application.The course table is related to the Discipline table, ie 1 Discipline belongs to several course, and at the time of registering a course and adding more courses to this course I can not accomplish th...
asked by 22.09.2014 / 22:22
1
answer

Return Join Linq C #

I'm trying to return a join for my class and it's giving me the following error    Error 1 Can not implicitly convert type   'System.Collections.Generic.List' in   'System.Collections.Generic.List' C: \ Projects \ ASP.NET \ AdvanceTechniques...
asked by 19.08.2014 / 15:36
1
answer

How to get the specific type of error returned by EntityFramework?

Following the question: How to intercept exceptions when working with the Entity Framework? Is it possible to get some type of error identifier? For example, Primary Key Violation, Foreign Key Inconsistency, and in my specific case, when it...
asked by 13.06.2014 / 03:52