Questions tagged as 'asp.net-mvc'

1
answer

Link call method in Controller - C # MVC

I have a MySQL table that is displayed on a page of my project: foreach (var item in Model) { <tr> <td>@Html.DisplayFor(modelItem => item.id)</td> <td>@Html.DisplayFor(modelItem => item.nomeMarca...
asked by 04.04.2017 / 11:45
1
answer

MongoDB Integration with ASP.NET MVC 5 and PostgreSQL

I am building an ASP.NET MVC 5 project with PostgreSQL database, in this database there is a history table that will grow by about 500,000 lines per month and we will have reports that will take data from periods of one year. So we thought abo...
asked by 20.03.2017 / 15:25
2
answers

How to leave the json of two or more object classes at the same level in Asp.Net MVC

I have 3 classes being them Contact, Sector, Unit so I have Contact with one-to-many relationship with Sector and Unit generating Json with many layers, making it impossible for JQuery Bootgrid to access these fields. Checking JQuery Bootgrid...
asked by 24.02.2017 / 00:24
1
answer

Pass properties from the ViewModel to the Controller

I put my table inside a BeginForm passing my controller and my action, but when I submit submit the fields are NULL in the controller, I think it is not passing the ViewModel properties. @model Dlieve.BackOffice.Areas.BackOffice.Models....
asked by 07.02.2017 / 17:04
1
answer

Difference between WebApi and SPA

I know that SPA is nothing more than a specific WebApi , but the question is: How do I differentiate one from the other, ie, what is the purpose of each in the development world. Why would I develop a SPA instead of a WebA...
asked by 24.05.2017 / 18:57
1
answer

Create ActionFilter for login "Anonymous"

I searched the internet but did not find the answer to what I wanted. I have the simple code below that checks whether the user is authenticated or not in my ActionFilter public class FiltroLogin : ActionFilterAttribute { public override v...
asked by 29.05.2017 / 00:48
1
answer

Query with Linq to Entities in many-to-many relationship

I have the following tables in a database: The TeacherCourses table joins the many-to-many relationship between the Courses and Teachers tables. I have been trying for a long time to make a query with Linq to Entities that returns all...
asked by 23.12.2016 / 01:50
1
answer

Upload file problem in ASP.NET mvc

Uploading files through FileUpload has a maximum size of 4 MB, after searching I found here in stackoverflow that should add: <configuration> <system.web> <httpRuntime maxRequestLength="1048576" /> </syst...
asked by 01.11.2016 / 03:20
1
answer

filter table asp.net mvc [closed]

I need to filter a table, which is in a partial view, depending on the parameter entered in a field, which is passed to the controller via ajax. How do I reload the table with the filter applied? Part of the index where this my partial <...
asked by 31.10.2016 / 17:01
1
answer

Export List to Excel

I have a list and would like to export to Excel, this code is bringing the records correctly, it just does not export the file. Do I need to add something else or would I have another way? CorpDAO dao = new CorpDAO(); List<CorpCR...
asked by 04.11.2016 / 15:23