Questions tagged as 'mvc'

1
answer

Change URL of / controller? id = 1 to / controller / 1

In my view I have two buttons that pass parameters via GET to the index of my controller, the problem is that the URL does not stay with the traditional? id = 1 and I wanted to make it look like this: / controller / 1 View: @using (Html.B...
asked by 27.09.2018 / 19:59
2
answers

use of distinct in a dropdownlist

I want to remove equal names from my dropdownlist, but they are from different id's. I wanted to where I would have to deploy the code if it would be in the view, or in the controller somewhere else. Data in the table: Andthat'swhatthedropdo...
asked by 24.11.2017 / 18:30
1
answer

What is the most appropriate way to instantiate a database in an MVC pattern

I'm studying OOP and a little bit about the MVC structure, and I'm not sure where to create and instantiate the database to be used in the entire application, I thought how Model relates to data processing would be the best place to create the s...
asked by 14.05.2017 / 03:13
1
answer

SlimFramework: Method not allowed. Must be one of: GET

I'm having trouble resolving an error that is occurring in slim framework . I have a contact page that is accessed / p / contact , after accessing and clicking the submit button, it tries to send <form> via POST to the action...
asked by 07.03.2017 / 23:42
1
answer

Foreach without repeating the name

I have a Foreach in View, and it contains Description, qtd and dta, how do I make a foreach without repeating the description? Ex: I have a product X whose 10 units were removed on 10/1/2016, 3 units on 04/10/2016, 8 units on 10/15/2016, how do...
asked by 18.10.2016 / 07:07
1
answer

Jquery MaskMoney asp.net Mvc

I use Jquery MaskMoney in my inputs to treat decimais , so far so good, but I noticed that when I type values above 1,000,00 But when the value is a thousand where the point (999.99) does not go, the value...
asked by 01.12.2016 / 18:09
1
answer

List of View objects for controller

I have two Client and Address entities where the client has multiple addresses. At the time of filling out the form, the user can add two addresses in the same form and at the time of the Submit, would like to receive the data of the client and...
asked by 19.10.2016 / 04:33
2
answers

MVC - pass a php variable to the angular.js controller

I am making a listing and want to pass the values of a model to the algebra script that is in the view. Model: function getAllDisplayable_all() { $this->db->select('id_menu, nome, descricao, preco, foto'); $result = $this-&g...
asked by 09.06.2016 / 16:25
2
answers

Where to put comments and javadoc? Model or Controller?

I'm doing an MVC program, but when it comes to describing in%% of what each window does, I was in doubt whether to put those comments in the javadoc (Model) itself, or forms of its windows . Which one would be the most correct? Bec...
asked by 03.06.2016 / 01:48
1
answer

Stored procedure asynchronous

When attempting to execute procedure asynchronously public async Task<ActionResult> Index() { Stopwatch watch = new Stopwatch(); watch.Start(); ContentManagement service = new ContentManagement(); var...
asked by 14.06.2016 / 20:25