Most voted "mvc" questions
Model-view-controller (MVC) is a model of software architecture that separates information representation from user interaction with it.
Learn more…743 questions
Sort by count of
-
2
votes0
answers139
viewsWhat is the best technique to use Viewmodel with C#mvc lists?
I have two templates: event registration package and registration package, where the event registration package template has a list of registration packages (see code below, removed some fields).…
-
2
votes1
answer1785
viewsUrl encryption
I have a way of Email which generates a link through HTTP request, which will send to the user’s email for exchange. But for testing I fixed in this URL the user ID, but for security reasons I have…
-
2
votes1
answer206
viewsWhat is the life cycle of an HTTP request in MVC standards?
I’ve been developing in ASP.NET MVC5 for 1 year and 2 months, and to this day I can’t quite understand who calls who. Researching further, I found that answer that says(in free translation):…
mvcasked 6 years, 7 months ago Leonardo Bonetti 5,313 -
2
votes1
answer503
viewsData return Json
I have this function to return the data in JSON, but I’m not able to make it work in MVC Core. public ActionResult SalvarItens(string HoraInicio, string HoraFim, bool Seg, bool Ter, bool Qua, bool…
-
2
votes1
answer97
viewsJquery Pick Value Nearest Checkbox by Line
I need help with the following: I want to take the checkbox that is disabled and play on console 0 for what is disabled, and 1 for what is enabled. My source looks like this: (Asp.net mvc) @model…
-
2
votes1
answer635
viewsC# - Multiple keys in JOIN LINQ Lambda Expressions
I have an SQL as follows: SELECT * FROM KY_AR_SOLICITACAO A JOIN KY_AR_SOLICITACAO_ITEM B ON A.NF_ENTRADA = B.NF_ENTRADA AND A.SERIE_NF_ENTRADA = B.SERIE_NF_ENTRADA AND A.NOME_CLIFOR = B.NOME_CLIFOR…
-
2
votes1
answer223
views.htaccess and rewrite rules in PHP server
I am developing a php microframwork, and I am using the built-in php server (php -S 127.0.0.1:8000 -t public) with root directory in the public folder/. I don’t know if . htaccess works or is…
-
2
votes1
answer72
viewsProblem Initialize List for ASP.NET MVC validation
I have an action that receives a user file. [HttpPost] public ActionResult UpdateFicheiro(FicheiroViewModel model) { var listaDeFicheirosJaAnexados = servico.obtemficheirosJaAnexados();…
-
2
votes2
answers207
viewsPHP - Trait or Extended Class
Good afternoon, you guys, I have a trait that format data from Models in a MVC system, the system works correctly, however came to me a doubt in relation to Pattern design and performance, in case,…
-
2
votes1
answer104
viewsConfiguration file and/or Constants, when to use?
Currently I use constants to store configuration data in my application, but searching saw that it is a "bad practice" by coupling that can generate, I found some questions right here in…
-
2
votes1
answer63
viewsList only future items in C#
I have a database with a list of shows registered with location, date and time, but I need it to return me on the admin screen only the shows that will still happen instead of listing all shows…
-
2
votes2
answers100
viewsWhat kind of problems do routes solve?
Every framework in MVC architecture or even other architectures I come across, I find it almost mandatory to configure routes. However, it’s not clear to me what kind of problem that solves, and I…
-
2
votes0
answers47
viewsDesign using SPRING MVC does not perform CRUD on the bank correctly
I have a Controller with some implemented methods that save, update and remove my object pr of the kind professorRepository on the bench. I am using the Spring boot for this project, then the CRUD…
-
2
votes1
answer57
viewsHow to transform boolean input values to string values using C# (MVC)?
I’m having trouble transforming values from a Toggle input into a string value to be stored in a BD. The goal is to make a Buy/Sell Toggle that shows the type of operation the user is entering the…
-
2
votes1
answer37
viewsDuplicate field ASP.NET Core MVC
Good morning I am developing a web application and in the registration part I put a CPF field but as it can not be equal to what exists in the bank it of the error, I wanted it to return an error…
asp.net mvc asp.net-core identity validationasked 4 years, 4 months ago Gabriel Rodrigues Pavolin 33 -
2
votes0
answers58
viewsPreventing multiple threads for the same routine and the same user?
I’m developing a web app on ASP.NET Core MVC and some routines are called by clicking a button on the web page. It turns out you can push this button multiple times, so I need some…
-
2
votes1
answer34
viewsASP.NET Core: session duration
I did a program in ASP.NET Core MVC, which has the class Startup as: public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration…
-
1
votes1
answer122
viewsValidation of fields in cshtml
I have seen some examples to validate fields, but all of them I have to inform which field or control to be validated, IE, I have to pass Name of the controls. In case I have a form with 20 fields,…
-
1
votes1
answer321
viewsProblems with SLIM paging with Pager
How to change page using Pear-Pager in SLIM Framework? The code of router is: $app->get('/imoveis(/:pg)', function($pg = '') use($app) { $imoveis = array('casa 1', 'casa 2', 'casa 3', 'casa 4',…
-
1
votes1
answer674
viewsHow do I get the name of a button in Mouselistener?
How do I get the name of a button in a class that implements Mouselistener: public class Viewer extends javax.swing.JFrame{ public Viewer() { initComponents(); } public void init(){ MouseListener…
-
1
votes0
answers127
viewsController mapping for the Domain model
We have the following situations in general, consider objects larger than the example. Situation 1 We may have a request that has all Account parameters;…
-
1
votes2
answers721
viewsHow do I direct an Action to a view inside a folder?
In my Ugcontroller I have an Action named Register that takes me to the View Register.cshtml that is in the UG folder. That is to say: Controller: UGController Action: Cadastro() Link: /UG/Cadastro…
-
1
votes1
answer262
viewsUnable to locate current JTA Transaction
The project is divided into the following modules: test-persistence; test-services; web test; I use Glassfish 4 as an application server and it has a connection pool configured for connections to…
-
1
votes1
answer79
viewsCakephp: Why is Model not being loaded correctly?
Model: CategoriaBanner Controller: CategoriasBannersController One thing’s keeping me up at night: When trying to use create(); it gives object error when trying to use what would be the…
-
1
votes1
answer805
viewsModel layer with DAO classes
Work with an MVC application that can be considered large or at least average, as it involves hundreds of features and more than 400 Mysql database tables. As a ORM tool we adopted Doctrine through…
-
1
votes1
answer1324
viewsThe standard MVC Model class in PHP
I am studying MVC, I created the abstract Model class to serve as a "template" for the others who can inherit it. I would like an evaluation of the code as, positive and negative points, how best to…
-
1
votes1
answer383
viewsPassing value from one view to another view - PHP
Guys, I need to pass a value from one View to another View, in case an ID. For example: In the Main View I have a list of vacancies, when I click on one of the vacancies will load the second View…
-
1
votes1
answer307
viewsDoctrine - Access the $entityManager variable created in bootstrap.php from within a Class
I am studying Doctrine and am adapting a project I had already developed in MVC to work with Doctrine. I am having a certain doubt on how to proceed in relation to the variable $entityManager that I…
-
1
votes3
answers332
viewsIs it recommended to test model validations?
My experience is with Ruby on Rails, but I believe my question will be for other cases. The ORM Activerecord (from Rails) allows validating in fields things like: Presence Oneness Size (of a string)…
-
1
votes1
answer1388
viewsTwo forms on one page
Good guys I have a view with two forms and both possess action="current_url()", i.e., the two will perform the action on the same page, the problem is that regardless of the button I click to send…
-
1
votes1
answer1827
viewsHow to create a set of tables in the database via PHP
I’m having problems while creating the database automatically via PHP. I am developing a college MVC project and wanted to import the sql file and through a query create the tables. In the previous…
-
1
votes0
answers52
viewsDistribution of responsibilities of an agenda module
In an application, I need to present a calendar/calendar, which is composed of events and locations. I’m using the concept of Positorios, where I store all queries to a particular entity. In this…
-
1
votes1
answer86
viewshow to get an id of a model in a view via a link?
I have a link that calls a function JS (POPUP), in this popup I have a registration FORM, to validate all parameters of my form, I need to get the ID of My Model that is in the Link view I am not…
-
1
votes1
answer159
viewsAvoid persisting data while refreshing
I am recording a history log of accessed options while doing refresh on the page it is duplicating the data. How do I persist only on the request?
mvcasked 9 years, 5 months ago Al Unser Albuquerque 73 -
1
votes1
answer224
viewsData aggregation in PHP and MVC development
Good morning! I am developing a web system and I am having doubts about the organization as a MVC structure. There is a register of companies that already have class/model/control etc. My doubt…
-
1
votes2
answers497
viewsHow to receive value from a variable of another Class
I have a class variable Class1 and I want to use this variable in a function in the class Class2 Tela1 has as its control the Class1 and tela2 has as control the Class2 when called to tela2, Class2…
-
1
votes1
answer481
viewsQuery using Linq to sql in Asp.net MVC
I have a question about how to return the records according to the query. I don’t know what could be wrong, but the query is not returning according to what was past. I have my controller: public…
-
1
votes2
answers757
viewsMVC PHP - Libraries - Directory Structure
I have a question regarding the folder structure of the application. Next, doubt arises when there is a need to write a class that integrates with a API Which part would this class be allocated to?…
-
1
votes1
answer531
viewsHow to pass objects between controllers in MVC using POO
Basically, I need to be login successful to save the username in a variable and use it in another controller. Model.php: public function login($email, $password) { session_start(); $sql = "SELECT *…
-
1
votes1
answer552
viewsHow to make a chart grouped between bars and lines with google Chart and export to pdf (C#, MVC)
It would be something like the image below: Vlw guys…
-
1
votes3
answers369
viewsMVC and dynamic language change
I have a MVC that I implement in my projects in PHP. This supports multiple languages and by default gets the active/initial language from the browser. However there are projects that require the…
-
1
votes1
answer81
viewsForm only works the second time
I made a form log in and it all worked out. But you have a bug, only log in on the second try. It’s in MVC standard: Controller: public function index() { if(!$this->model->isUserLoggedIn()) {…
-
1
votes1
answer770
viewsSend form data by Ajax in MVC project
To begin I will illustrate a bit of the system for you, my directory structure is the following: >leganto(raiz) ---> controller -------> ControllerGlobal.php ------->…
-
1
votes1
answer756
viewsHow does the MVC+ Service layer architecture work?
I’m trying to find some documentation for this, if anyone has a book that addresses the subject please inform.
-
1
votes2
answers168
viewsWhere to place comments and javadoc ? Model or Controller?
I’m doing an MVC program, but it’s time to describe in a javadoc what each window does, I was in doubt between putting these comments in the forms (Model), or us controllers of the respective…
-
1
votes1
answer217
viewsBetter organization of my project
My project has the following packages in its structure: br.com.xxxx.model: Which contains the entities. br.com.xxxx.negocio: That contains the DAO interface along with the implementing classes.…
-
1
votes1
answer138
viewsmake a button disappear
I have a code where it creates a table if it has a record in the database. In this table, in the last column there is a button that when clicking opens a more detailed screen about that table row. I…
-
1
votes1
answer121
viewsI’m unable to update a field in Cakephp with $this->Model->saveField()
I’m unable to update a certain field in Cakephp. When the $this->OrdemServico->saveField(), he simply does not perform. Code: class OrdemServico extends AppModel { public $name =…
-
1
votes0
answers33
viewsWhat is the ideal model for creating classes involving the database?
I have a very strong question about what is the best way to create classes to "interact" with the database (in PHP, in this case). For example: I need very specific validations of each table to be…
-
1
votes1
answer444
viewsTreat session by codeigniter model or controller
I’m trying to send the data from the database to the session, gave a print_r on the data received from the bank, but I can not pass it to the session, follow the code. Controller <?php…